1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "video_urls": [
10 { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" },
11 { "url": "https://youtu.be/HOfdboHvshg" },
12 ],
13 "playlistOrChannelUrls": [],
14 "maxVideosPerSource": 5,
15 "desired_resolution": "360p",
16 "upload_video_to_apify": False,
17 "proxyConfiguration": {
18 "useApifyProxy": True,
19 "apifyProxyGroups": ["RESIDENTIAL"],
20 },
21}
22
23
24run = client.actor("scraper-fleet/youtube-video-downloader").call(run_input=run_input)
25
26
27print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
28for item in client.dataset(run.default_dataset_id).iterate_items():
29 print(item)
30
31