1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchTerms": ["python"],
10 "maxItems": 3,
11 "freeOnly": False,
12 "sortOrder": "RELEVANCE",
13 "languages": [],
14 "levels": [],
15 "videoLengths": [],
16 "closedCaptionLanguages": [],
17 "mustHaveClosedCaptions": False,
18 "mustHaveQuizzes": False,
19 "mustHaveCodingExercises": False,
20 "mustHavePracticeTests": False,
21 "mustHaveWorkspaces": False,
22 "mustHaveRoleplays": False,
23 "practiceTestCoursesOnly": False,
24 "certificationPrepOnly": False,
25 "includeCourseDetails": False,
26}
27
28
29run = client.actor("datascraperes/udemy-course-catalog-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