1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "startUrls": [
9 { "url": "https://openlibrary.org/search.json?q=python&limit=20" },
10 { "url": "https://openlibrary.org/works/OL45804W.json" },
11 { "url": "https://openlibrary.org/search.json?author=tolkien&limit=20" },
12 ] }
13
14
15run = client.actor("ahmdshrif/openlibrary-books-scraper").call(run_input=run_input)
16
17
18print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
19for item in client.dataset(run.default_dataset_id).iterate_items():
20 print(item)
21
22