1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "url": "https://example.com",
10 "batchData": [
11 {
12 "url": "https://example.com",
13 "device": "desktop",
14 "fullPage": True,
15 "format": "png",
16 },
17 {
18 "url": "https://example.com",
19 "device": "mobile",
20 "fullPage": False,
21 "format": "jpeg",
22 },
23 ],
24 "delay": 0,
25 "width": 1920,
26 "height": 1080,
27 "quality": 90,
28}
29
30
31run = client.actor("perryay/website-screenshot-generator").call(run_input=run_input)
32
33
34print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
35for item in client.dataset(run["defaultDatasetId"]).iterate_items():
36 print(item)
37
38