1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9    "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
10    "clips": [
11        {
12            "name": "intro_clip",
13            "start": "00:00:00",
14            "end": "00:00:15",
15        },
16        {
17            "name": "clip_1",
18            "start": "00:01:30",
19            "end": "00:01:45",
20        },
21        {
22            "name": "clip_2",
23            "start": "00:02:30",
24            "end": "00:02:45",
25        },
26    ],
27    "proxy": {
28        "useApifyProxy": True,
29        "apifyProxyGroups": ["RESIDENTIAL"],
30    },
31}
32
33
34run = client.actor("fractalai/youtube-video-clipper").call(run_input=run_input)
35
36
37print("๐พ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
38for item in client.dataset(run["defaultDatasetId"]).iterate_items():
39    print(item)
40
41