1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "TRENDING",
12 "searchQueries": [
13 "billionaire"
14 ],
15 "listingUrls": [
16 {
17 "url": "https://www.goodshort.com/drama/nanny-for-hire-mommy-forever-31001684652"
18 },
19 {
20 "url": "https://www.goodshort.com/episode/nanny-for-hire-mommy-forever-31001684652/001-62495257"
21 },
22 {
23 "url": "https://www.goodshort.com/tag/revenge-playlets-videos"
24 },
25 {
26 "url": "https://www.goodshort.com/dramas/romance-137-playlets"
27 },
28 {
29 "url": "https://www.goodshort.com/channel/Most-Trending"
30 },
31 {
32 "url": "https://www.goodshort.com/search/billionaire"
33 },
34 {
35 "url": "https://www.goodshort.com/tags/all"
36 }
37 ],
38 "fetchDetails": true,
39 "fetchEpisodes": true,
40 "maxItems": 20,
41 "proxy": {
42 "useApifyProxy": true,
43 "apifyProxyGroups": [
44 "RESIDENTIAL"
45 ]
46 }
47};
48
49
50const run = await client.actor("abotapi/goodshort-catalog-scraper").call(input);
51
52
53console.log('Results from dataset');
54console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55const { items } = await client.dataset(run.defaultDatasetId).listItems();
56items.forEach((item) => {
57 console.dir(item);
58});
59
60