1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "videos": [
10 {
11 "id": "cache-demo",
12 "title": "Reduce cloud costs with a cache",
13 "segments": [
14 {
15 "start": 0,
16 "dur": 2,
17 "text": "Welcome back, subscribe before we begin.",
18 },
19 {
20 "start": 2,
21 "dur": 2,
22 "text": "Today we compare a simple cache.",
23 },
24 {
25 "start": 4,
26 "dur": 10,
27 "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters.",
28 },
29 ],
30 },
31 {
32 "id": "zwrot-towaru",
33 "title": "Zwrot towaru w sklepie internetowym",
34 "text": "Zwrot towaru zaczyna się od numeru zamówienia i daty zakupu. Przygotuj opis produktu oraz potwierdzenie zakupu, potem sprawdź zasady sprzedawcy i zachowaj kopię zgłoszenia. Ten przykład przedstawia dostarczony scenariusz filmu do kontroli redakcyjnej. W dalszej części scenariusza wracamy do numeru zamówienia i sposobu zapisania potwierdzenia. To dane demonstracyjne do przeglądu tekstu.",
35 },
36 {
37 "id": "produktvideo",
38 "title": "Produktvideo mit klarer Planung",
39 "segments": [
40 {
41 "start": 0,
42 "dur": 3,
43 "text": "Ein einfacher Trick garantiert immer perfekte Videos.",
44 },
45 {
46 "start": 3,
47 "dur": 8,
48 "text": "Für das Produktvideo planen wir Licht, Ton und drei Aufnahmen. Danach vergleichen wir die Aufnahmen mit der Planung und prüfen die Aussagen im Skript.",
49 },
50 ],
51 },
52 ],
53 "windowSeconds": 3,
54 "openingWords": 30,
55 "maxItems": 1,
56}
57
58
59run = client.actor("danielmichalek/video-hook-analyzer").call(run_input=run_input)
60
61
62print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
63for item in client.dataset(run.default_dataset_id).iterate_items():
64 print(item)
65
66