1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "videos": [
10 "https://www.youtube.com/watch?v=jNQXAC9IVRw",
11 "https://youtu.be/dQw4w9WgXcQ",
12 ],
13 "languages": [
14 "en",
15 "auto",
16 ],
17 "outputFormats": [
18 "segments",
19 "text",
20 ],
21 "maxVideosPerSource": 10,
22 "proxyConfiguration": {
23 "useApifyProxy": True,
24 "apifyProxyGroups": ["RESIDENTIAL"],
25 },
26}
27
28
29run = client.actor("best_apis/youtube-transcript-scraper").call(run_input=run_input)
30
31
32print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
33for item in client.dataset(run.default_dataset_id).iterate_items():
34 print(item)
35
36