1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": ["https://www.markepear.dev/blog/developer-marketing-guide"],
10 "element_selector": "",
11 "js_script": "async () => { return document.title; }",
12 "js_timeout": 10,
13 "cookies": [{
14 "name": "cna",
15 "value": "abc123",
16 "domain": ".example.com",
17 "path": "/",
18 "expires": None,
19 }],
20 "max_retries_per_url": 2,
21 "ignore_url_failures": True,
22 "proxy": { "useApifyProxy": False },
23}
24
25
26run = client.actor("stealth_mode/web-content-scraper").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33