1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 { "url": "https://github.com/explore" },
11 { "url": "https://github.com/trending?since=daily" },
12 { "url": "https://github.com/trending?since=weekly" },
13 { "url": "https://github.com/trending?since=monthly" },
14 { "url": "https://github.com/trending/python?since=weekly" },
15 { "url": "https://github.com/trending/javascript?since=weekly" },
16 { "url": "https://github.com/trending/typescript?since=weekly" },
17 { "url": "https://github.com/trending/rust?since=weekly" },
18 { "url": "https://github.com/trending/go?since=weekly" },
19 { "url": "https://github.com/trending/java?since=weekly" },
20 ],
21 "maxItems": 500,
22 "proxyConfiguration": { "useApifyProxy": True },
23}
24
25
26run = client.actor("samer-samaha/github-scraper").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33