1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feedUrls": [
12 "https://feeds.twit.tv/twit.xml"
13 ],
14 "itemsToCheck": 5,
15 "checks": [
16 "range_support",
17 "content_type",
18 "declared_length_match",
19 "redirect_depth",
20 "https_only",
21 "guid_stability"
22 ],
23 "maxRedirects": 5,
24 "probeBytes": 65536,
25 "lengthTolerancePercent": 1,
26 "maxEnclosures": 100,
27 "timeoutSeconds": 20,
28 "maxFeedBytes": 10485760,
29 "concurrency": 4,
30 "baselineStoreName": "feed-enclosure-baseline",
31 "updateBaseline": true,
32 "userAgent": "FeedEnclosureGate/0.1 (+https://apify.com)"
33};
34
35
36const run = await client.actor("kingii98/podcast-and-newsletter-feed-enclosure-delivery-gate").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