1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": [{ "url": "https://www.apify.com/" }],
10 "format": "png",
11 "quality": 85,
12 "fullPage": True,
13 "device": "custom",
14 "viewportWidth": 1280,
15 "viewportHeight": 1080,
16 "deviceScaleFactor": 1,
17 "colorScheme": "no-preference",
18 "locale": "en-US",
19 "waitUntil": "domcontentloaded",
20 "waitForImages": False,
21 "waitForFonts": True,
22 "delay": 0,
23 "scrollToBottom": False,
24 "maxScrollSteps": 400,
25 "scrollStepPx": 250,
26 "delayAfterScrolling": 0,
27 "waitUntilNetworkIdleAfterScroll": False,
28 "waitUntilNetworkIdleAfterScrollTimeout": 1000,
29 "hideFixedElements": False,
30 "cookieBannerAction": "hide",
31 "pdfPageSize": "web",
32 "pdfLandscape": False,
33 "pdfPrintBackground": True,
34 "pdfFitOnePage": False,
35 "pdfMargin": "none",
36 "maxConcurrency": 1,
37 "maxRetries": 0,
38 "navigationTimeoutSecs": 60,
39 "maxPageHeight": 0,
40}
41
42
43run = client.actor("nimbryxo-studio/full-page-website-screenshot-and-pdf-capture").call(run_input=run_input)
44
45
46print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
47for item in client.dataset(run.default_dataset_id).iterate_items():
48 print(item)
49
50