1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 { "url": "https://apify.com/futurizerush" },
11 { "url": "https://rush.zeabur.app/" },
12 { "url": "https://www.threads.com/@futurizerush" },
13 ],
14 "maxRequestsPerCrawl": 10,
15 "maxConcurrency": 3,
16 "smartMode": True,
17 "cacheEnabled": True,
18 "extractionRules": {
19 "article_title": "h1.post-title, h1.article-title, h1.entry-title",
20 "article_content": "article, main, .post-content, .article-content",
21 "author": ".author-name, .by-author, .post-author",
22 "publish_date": "time, .post-date, .publish-date",
23 "category": ".category, .post-category",
24 "tags": ".tags a, .post-tags a",
25 },
26 "customData": {
27 "source": "Apify Actor",
28 "scraped_by": "@futurizerush",
29 "language": "en-US",
30 },
31 "waitForSelector": "",
32 "scrollToBottom": False,
33 "pageLoadTimeoutSecs": 25,
34 "blockResources": [],
35}
36
37
38run = client.actor("futurizerush/web-scraper").call(run_input=run_input)
39
40
41print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
42for item in client.dataset(run["defaultDatasetId"]).iterate_items():
43 print(item)
44
45