1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": [
10 "artificial intelligence",
11 "stock market",
12 ],
13 "sources": [
14 "google_news",
15 "rss",
16 ],
17 "rssFeeds": [
18 "https://feeds.bbci.co.uk/news/rss.xml",
19 "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml",
20 ],
21 "proxyConfiguration": { "useApifyProxy": False },
22}
23
24
25run = client.actor("second_coming/news-aggregator-monitor").call(run_input=run_input)
26
27
28print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
29for item in client.dataset(run["defaultDatasetId"]).iterate_items():
30 print(item)
31
32