1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "target": "searchByKeyword",
10 "keywords": ["fantasy"],
11 "tags": ["werewolf"],
12 "genresOrCategories": ["Romance"],
13 "storyIdsOrUrls": ["https://www.wattpad.com/story/82040526-a-different-virus-heartfire"],
14 "usernames": ["CrystalScherer"],
15 "chapterIdsOrUrls": ["https://www.wattpad.com/300363744-a-different-virus-heartfire-chapter-1"],
16 "maxItems": 25,
17 "proxyConfiguration": { "useApifyProxy": False },
18}
19
20
21run = client.actor("parsebird/wattpad-scraper").call(run_input=run_input)
22
23
24print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
25for item in client.dataset(run.default_dataset_id).iterate_items():
26 print(item)
27
28