1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": [{ "url": "https://quotes.toscrape.com/" }],
10 "mode": "html-only",
11 "proxyConfiguration": {
12 "useApifyProxy": True,
13 "apifyProxyGroups": ["RESIDENTIAL"],
14 },
15 "schema": {
16 "type": "object",
17 "properties": {
18 "title": {
19 "type": "string",
20 "description": "Page title",
21 },
22 "quotes": {
23 "type": "array",
24 "items": {
25 "type": "object",
26 "properties": {
27 "text": { "type": "string" },
28 "author": { "type": "string" },
29 },
30 },
31 "description": "Quotes with text and author",
32 },
33 "links": {
34 "type": "array",
35 "items": { "type": "string" },
36 "description": "Important links",
37 },
38 },
39 "required": [
40 "title",
41 "quotes",
42 ],
43 },
44}
45
46
47run = client.actor("tuguidragos/hybrid-vision-spider-ai-powered-universal-web-scraper").call(run_input=run_input)
48
49
50print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
51for item in client.dataset(run["defaultDatasetId"]).iterate_items():
52 print(item)
53
54