1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "sitemap",
12 "mapType": "EPISODE",
13 "urls": [
14 "https://www.hotstar.com/in/shows/world-s-weirdest/6207",
15 "https://www.hotstar.com/in/shows/triveni-sangama/13023/sudha-instigates-nanda-kishore/1000175440/watch",
16 "https://www.hotstar.com/in/movies/chintamani/1971007215",
17 "https://www.hotstar.com/in/browse/category/romance/928",
18 "https://www.hotstar.com/in/sports/cricket",
19 "https://www.hotstar.com/in/sports/football/troyes-vs-paris-fc-highlights/1271686360/video/highlights/watch"
20 ],
21 "maxItems": 20,
22 "proxy": {
23 "useApifyProxy": true,
24 "apifyProxyGroups": [
25 "RESIDENTIAL"
26 ],
27 "apifyProxyCountry": "IN"
28 },
29 "incrementalMode": false,
30 "emitUnchanged": false,
31 "emitExpired": false,
32 "ignoreFieldsForChanges": []
33};
34
35
36const run = await client.actor("abotapi/hotstar-com-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46