📖

apifyってのでスクレイピングやるとすごいらしい

2023/07/30に公開

apifyっていうのを使うとの〜コードでスクレイピングができるようになるらしい。
1まずはサインアップ
2その後Tasksというものの例に沿って実行していく。ここでは「好きなtiktokのハッシュタグを設定してね!」とのことだったので「#勉強法」と記入した。


configuration: the way in which all the equipment that makes up a computer system is set to operate
→つまり、「いろんな機能が入ったセット」
Actor: スクレイピングをするコード
Tasks are reusable configurations of a single Actor that can be adapted to specific use cases.
→タスクは再利用できるいろんな機能詰め込まれたセット、一つのスクレイピングコードの、いろんなところに使える
→タスクはいろんなところに再利用できるスクレイピングコードですよ〜ってこと

ここで新しいactor作成

9:22
正直こういうの見ると仕事がなくる、何すればいいのかがwからない〜、俺がやってきたことは無駄なのか?みたいになってしまう。

9:22
このツールを使ってスーモの物件情報を取得してみたいが、どのように使えば良いかわからない。

Start URLs
The Start URLs (startUrls) field represent the initial list of URLs of pages that the scraper will visit. You can either enter these URLs manually one by one, upload them in a CSV file or link URLs from a Google Sheet document. Note that each URL must start with either a http:// or https:// protocol prefix.

→URLはhttps:// or http://にしてくださいね

The scraper supports adding new URLs to scrape on the fly, either using the Link selector and Glob Patterns/Pseudo-URLs options, or by calling await context.enqueueRequest()inside the Page function.

→Glob Patterns/Pseudo-URLsとかで必要な情報スクレイピングできる

参考:https://zenn.dev/takkota/articles/377ed7a209a9f2

Discussion