1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [{ "url": "https://quotes.toscrape.com" }],
10 "fields": [
11 {
12 "name": "text",
13 "description": "the full quote text",
14 },
15 {
16 "name": "author",
17 "description": "name of the person who said the quote",
18 },
19 {
20 "name": "tags",
21 "description": "list of tag labels on the quote",
22 "type": "array",
23 },
24 ],
25}
26
27
28run = client.actor("muhammadafzal/ai-web-extractor").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35