1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "userId": "demo_user_123",
10 "planType": "starter",
11 "bubbleWebhookUrl": "https://httpbin.org/post",
12 "action": "scrape_website",
13 "targetUrl": "https://quotes.toscrape.com/",
14 "urls": [
15 "https://quotes.toscrape.com/",
16 "https://books.toscrape.com/",
17 ],
18 "dataPoints": {
19 "title": "h1",
20 "quote": ".quote .text",
21 "author": ".quote .author",
22 },
23 "priceSelector": ".price",
24}
25
26
27run = client.actor("rodrigo91/bubble-integration-pro").call(run_input=run_input)
28
29
30print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
31for item in client.dataset(run["defaultDatasetId"]).iterate_items():
32 print(item)
33
34