1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "targets": [
10 "🔥 webscraping",
11 "🐍 r/python",
12 "👤 u/spez",
13 ],
14 "subreddits": [
15 "python",
16 "webscraping",
17 "learnprogramming",
18 ],
19 "proxyConfiguration": {
20 "useApifyProxy": True,
21 "apifyProxyGroups": ["RESIDENTIAL"],
22 },
23}
24
25
26run = client.actor("scrapemesh/reddit-subreddit-members-scraper").call(run_input=run_input)
27
28
29print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
30for item in client.dataset(run["defaultDatasetId"]).iterate_items():
31 print(item)
32
33