Comparing version 1.0.0 to 1.0.1
@@ -56,4 +56,4 @@ import ax, { AxiosRequestConfig } from 'axios'; | ||
id: listData.playlistId, | ||
video_count: +si0.stats[0].runs[0].text.replace(/[^0-9]/g, ''), | ||
view_count: +si0.stats[1].simpleText.replace(/[^0-9]/g, ''), | ||
video_count: +si0.stats[0].runs[0]?.text?.replace(/[^0-9]/g, ''), | ||
view_count: +si0.stats[1]?.simpleText?.replace(/[^0-9]/g, '') || 0, | ||
description: mf.description, | ||
@@ -69,4 +69,4 @@ isUnlisted: mf.unlisted, | ||
} | ||
} catch { | ||
throw Error('Could not parse playlist metadata') | ||
} catch(e) { | ||
throw Error('Could not parse playlist metadata: ' + e.message); | ||
} | ||
@@ -81,3 +81,3 @@ } | ||
videos.push({ | ||
title: v.title.simpleText, | ||
title: v.title.runs[0].text, | ||
url: baseURL + '/watch?v=' + v.videoId, | ||
@@ -84,0 +84,0 @@ id: v.videoId, |
@@ -6,3 +6,3 @@ export interface YTPlaylist { | ||
video_count: number | ||
view_count: number | ||
view_count?: number | ||
description: string | ||
@@ -9,0 +9,0 @@ isUnlisted: boolean |
@@ -19,3 +19,3 @@ "use strict"; | ||
async function fetchFromPlaylist(url) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; | ||
let test = /[?&]list=([^#\&\?]+)|^([a-zA-Z0-9-_]+)$/.exec(url); | ||
@@ -31,3 +31,3 @@ if (!test) | ||
} | ||
catch (_s) { | ||
catch (_w) { | ||
throw Error('Could not fetch/parse playlist'); | ||
@@ -54,4 +54,4 @@ } | ||
id: listData.playlistId, | ||
video_count: +si0.stats[0].runs[0].text.replace(/[^0-9]/g, ''), | ||
view_count: +si0.stats[1].simpleText.replace(/[^0-9]/g, ''), | ||
video_count: +((_t = (_s = si0.stats[0].runs[0]) === null || _s === void 0 ? void 0 : _s.text) === null || _t === void 0 ? void 0 : _t.replace(/[^0-9]/g, '')), | ||
view_count: +((_v = (_u = si0.stats[1]) === null || _u === void 0 ? void 0 : _u.simpleText) === null || _v === void 0 ? void 0 : _v.replace(/[^0-9]/g, '')) || 0, | ||
description: mf.description, | ||
@@ -68,4 +68,4 @@ isUnlisted: mf.unlisted, | ||
} | ||
catch (_t) { | ||
throw Error('Could not parse playlist metadata'); | ||
catch (e) { | ||
throw Error('Could not parse playlist metadata: ' + e.message); | ||
} | ||
@@ -79,3 +79,3 @@ } | ||
videos.push({ | ||
title: v.title.simpleText, | ||
title: v.title.runs[0].text, | ||
url: baseURL + '/watch?v=' + v.videoId, | ||
@@ -114,2 +114,2 @@ id: v.videoId, | ||
module.exports = fetchFromPlaylist; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9saWIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLGtEQUErQztBQUsvQyxNQUFNLE1BQU0sR0FBdUI7SUFDL0IsT0FBTyxFQUFFO1FBQ0wsWUFBWSxFQUFFLGFBQWE7UUFDM0IsdUJBQXVCLEVBQUUsQ0FBQztRQUMxQiwwQkFBMEIsRUFBRSxrQkFBa0I7S0FDakQ7Q0FDSixDQUFBO0FBRUQsTUFBTSxPQUFPLEdBQUcscUJBQXFCLENBQUM7QUFFdEM7OztHQUdHO0FBQ0gsS0FBSyxVQUFVLGlCQUFpQixDQUFDLEdBQVc7O0lBQ3hDLElBQUksSUFBSSxHQUFHLHlDQUF5QyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUMvRCxJQUFHLENBQUMsSUFBSTtRQUNKLE1BQU0sS0FBSyxDQUFDLDRCQUE0QixDQUFDLENBQUM7SUFDOUMsSUFBSSxVQUFVLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0F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JheS5tYXAodiA9PiB2LnBsYXlsaXN0VmlkZW9SZW5kZXJlcikpXHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICB2aWRlb3MucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHYudGl0bGUuc2ltcGxlVGV4dCxcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IGJhc2VVUkwgKyAnL3dhdGNoP3Y9JyArIHYudmlkZW9JZCxcclxuICAgICAgICAgICAgICAgICAgICBpZDogdi52aWRlb0lkLFxyXG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aDogdi5sZW5ndGhUZXh0LnNpbXBsZVRleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgbWlsaXNfbGVuZ3RoOiArdi5sZW5ndGhTZWNvbmRzICogMTAwMCxcclxuICAgICAgICAgICAgICAgICAgICB0aHVtYm5haWxfdXJsOiAnaHR0cHM6Ly9pLnl0aW1nLmNvbS92aS8nICsgdi52aWRlb0lkICsgJy9ocWRlZmF1bHQuanBnJyxcclxuICAgICAgICAgICAgICAgICAgICBhdXRob3I6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogdi5zaG9ydEJ5bGluZVRleHQucnVuc1swXS50ZXh0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGJhc2VVUkwgKyB2LnNob3J0QnlsaW5lVGV4dC5ydW5zWzBdLm5hdmlnYXRpb25FbmRwb2ludC5jb21tYW5kTWV0YWRhdGEud2ViQ29tbWFuZE1ldGFkYXRhLnVybFxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSAgICk7XHJcbiAgICAgICAgICAgIH0gY2F0Y2gge1xyXG4gICAgICAgICAgICAgICAgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdmlkZW9zO1xyXG4gICAgfSBjYXRjaCB7XHJcbiAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBwYXJzZSB2aWRlb3MgZnJvbSB2aWRlb0RhdGEgSlNPTicpO1xyXG4gICAgfVxyXG59XHJcblxyXG5hc3luYyBmdW5jdGlvbiBnZXRBbGxWaWRlb3MoYWpheF91cmw6IHN0cmluZywgdmlkZW9zOiBZVHZpZGVvW10gPSBbXSkgOiBQcm9taXNlPFlUdmlkZW9bXT4ge1xyXG4gICAgdHJ5IHtcclxuICAgICAgICBsZXQgeXRBcHBlbmREYXRhID0gKGF3YWl0IGF4LmdldChiYXNlVVJMICsgJy9icm93c2VfYWpheD9jb250aW51YXRpb249JyArIGFqYXhfdXJsLCBycU9wdHMpKS5kYXRhO1xyXG4gICAgICAgIHZpZGVvcy5wdXNoKC4uLnBhcnNlVmlkZW9zRnJvbUpzb24oeXRBcHBlbmREYXRhWzFdLnJlc3BvbnNlLmNvbnRpbnVhdGlvbkNvbnRlbnRzLnBsYXlsaXN0VmlkZW9MaXN0Q29udGludWF0aW9uLmNvbnRlbnRzKSk7XHJcbiAgICAgICAgbGV0IGNvbnRUb2tlbjogc3RyaW5nID0geXRBcHBlbmREYXRhWzFdLnJlc3BvbnNlLmNvbnRpbnVhdGlvbkNvbnRlbnRzLnBsYXlsaXN0VmlkZW9MaXN0Q29udGludWF0aW9uPy5jb250aW51YXRpb25zPy5bMF0/Lm5leHRDb250aW51YXRpb25EYXRhPy5jb250aW51YXRpb247XHJcbiAgICAgICAgcmV0dXJuIGNvbnRUb2tlbiA/IGF3YWl0IGdldEFsbFZpZGVvcyhjb250VG9rZW4sIHZpZGVvcykgOiB2aWRlb3M7XHJcbiAgICB9IGNhdGNoIHtcclxuICAgICAgICB0aHJvdyBFcnJvcignQW4gZXJyb3IgaGFzIG9jY3VyZWQgd2hpbGUgdHJ5aW5nIHRvIGZldGNoIG1vcmUgdmlkZW9zJyk7XHJcbiAgICB9XHJcbn0iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiL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G4gICAgICAgICAgICBhdXRob3I6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IHNpMS50aXRsZS5ydW5zWzBdLnRleHQsXHJcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2VVUkwgKyBzaTEudGl0bGUucnVuc1swXS5uYXZpZ2F0aW9uRW5kcG9pbnQuY29tbWFuZE1ldGFkYXRhLndlYkNvbW1hbmRNZXRhZGF0YS51cmwsXHJcbiAgICAgICAgICAgICAgICBhdmF0YXJfdXJsOiBzaTEudGh1bWJuYWlsLnRodW1ibmFpbHMucG9wKCkudXJsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHZpZGVvczogdmlkZW9zXHJcbiAgICAgICAgfVxyXG4gICAgfSBjYXRjaChlKSB7XHJcbiAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBwYXJzZSBwbGF5bGlzdCBtZXRhZGF0YTogJyArIGUubWVzc2FnZSk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmZ1bmN0aW9uIHBhcnNlVmlkZW9zRnJvbUpzb24odmlkZW9EYXRhQXJyYXk6IGFueVtdKSA6IFlUdmlkZW9bXSB7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIGxldCB2aWRlb3M6IFlUdmlkZW9bXSA9IFtdO1xyXG4gICAgICAgIGZvcihsZXQgdiBvZiB2aWRlb0RhdGFBcnJheS5tYXAodiA9PiB2LnBsYXlsaXN0VmlkZW9SZW5kZXJlcikpXHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICB2aWRlb3MucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHYudGl0bGUucnVuc1swXS50ZXh0LFxyXG4gICAgICAgICAgICAgICAgICAgIHVybDogYmFzZVVSTCArICcvd2F0Y2g/dj0nICsgdi52aWRlb0lkLFxyXG4gICAgICAgICAgICAgICAgICAgIGlkOiB2LnZpZGVvSWQsXHJcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOiB2Lmxlbmd0aFRleHQuc2ltcGxlVGV4dCxcclxuICAgICAgICAgICAgICAgICAgICBtaWxpc19sZW5ndGg6ICt2Lmxlbmd0aFNlY29uZHMgKiAxMDAwLFxyXG4gICAgICAgICAgICAgICAgICAgIHRodW1ibmFpbF91cmw6ICdodHRwczovL2kueXRpbWcuY29tL3ZpLycgKyB2LnZpZGVvSWQgKyAnL2hxZGVmYXVsdC5qcGcnLFxyXG4gICAgICAgICAgICAgICAgICAgIGF1dGhvcjoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiB2LnNob3J0QnlsaW5lVGV4dC5ydW5zWzBdLnRleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYmFzZVVSTCArIHYuc2hvcnRCeWxpbmVUZXh0LnJ1bnNbMF0ubmF2aWdhdGlvbkVuZHBvaW50LmNvbW1hbmRNZXRhZGF0YS53ZWJDb21tYW5kTWV0YWRhdGEudXJsXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9ICAgKTtcclxuICAgICAgICAgICAgfSBjYXRjaCB7XHJcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB2aWRlb3M7XHJcbiAgICB9IGNhdGNoIHtcclxuICAgICAgICB0aHJvdyBFcnJvcignQ291bGQgbm90IHBhcnNlIHZpZGVvcyBmcm9tIHZpZGVvRGF0YSBKU09OJyk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmFzeW5jIGZ1bmN0aW9uIGdldEFsbFZpZGVvcyhhamF4X3VybDogc3RyaW5nLCB2aWRlb3M6IFlUdmlkZW9bXSA9IFtdKSA6IFByb21pc2U8WVR2aWRlb1tdPiB7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIGxldCB5dEFwcGVuZERhdGEgPSAoYXdhaXQgYXguZ2V0KGJhc2VVUkwgKyAnL2Jyb3dzZV9hamF4P2NvbnRpbnVhdGlvbj0nICsgYWpheF91cmwsIHJxT3B0cykpLmRhdGE7XHJcbiAgICAgICAgdmlkZW9zLnB1c2goLi4ucGFyc2VWaWRlb3NGcm9tSnNvbih5dEFwcGVuZERhdGFbMV0ucmVzcG9uc2UuY29udGludWF0aW9uQ29udGVudHMucGxheWxpc3RWaWRlb0xpc3RDb250aW51YXRpb24uY29udGVudHMpKTtcclxuICAgICAgICBsZXQgY29udFRva2VuOiBzdHJpbmcgPSB5dEFwcGVuZERhdGFbMV0ucmVzcG9uc2UuY29udGludWF0aW9uQ29udGVudHMucGxheWxpc3RWaWRlb0xpc3RDb250aW51YXRpb24/LmNvbnRpbnVhdGlvbnM/LlswXT8ubmV4dENvbnRpbnVhdGlvbkRhdGE/LmNvbnRpbnVhdGlvbjtcclxuICAgICAgICByZXR1cm4gY29udFRva2VuID8gYXdhaXQgZ2V0QWxsVmlkZW9zKGNvbnRUb2tlbiwgdmlkZW9zKSA6IHZpZGVvcztcclxuICAgIH0gY2F0Y2gge1xyXG4gICAgICAgIHRocm93IEVycm9yKCdBbiBlcnJvciBoYXMgb2NjdXJlZCB3aGlsZSB0cnlpbmcgdG8gZmV0Y2ggbW9yZSB2aWRlb3MnKTtcclxuICAgIH1cclxufSJdfQ== |
@@ -6,3 +6,3 @@ export interface YTPlaylist { | ||
video_count: number; | ||
view_count: number; | ||
view_count?: number; | ||
description: string; | ||
@@ -9,0 +9,0 @@ isUnlisted: boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL2xpYi9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFlUUGxheWxpc3Qge1xyXG4gICAgdGl0bGU6IHN0cmluZ1xyXG4gICAgdXJsOiBzdHJpbmdcclxuICAgIGlkOiBzdHJpbmdcclxuICAgIHZpZGVvX2NvdW50OiBudW1iZXJcclxuICAgIHZpZXdfY291bnQ6IG51bWJlclxyXG4gICAgZGVzY3JpcHRpb246IHN0cmluZ1xyXG4gICAgaXNVbmxpc3RlZDogYm9vbGVhblxyXG4gICAgdGh1bWJuYWlsX3VybDogc3RyaW5nXHJcbiAgICBhdXRob3I6IHtcclxuICAgICAgICBuYW1lOiBzdHJpbmdcclxuICAgICAgICB1cmw6IHN0cmluZ1xyXG4gICAgICAgIGF2YXRhcl91cmw6IHN0cmluZ1xyXG4gICAgfVxyXG4gICAgdmlkZW9zOiBZVHZpZGVvW11cclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBZVHZpZGVvIHtcclxuICAgIHRpdGxlOiBzdHJpbmdcclxuICAgIHVybDogc3RyaW5nXHJcbiAgICBpZDogc3RyaW5nXHJcbiAgICBsZW5ndGg6IHN0cmluZ1xyXG4gICAgbWlsaXNfbGVuZ3RoOiBudW1iZXJcclxuICAgIHRodW1ibmFpbF91cmw6IHN0cmluZ1xyXG4gICAgYXV0aG9yOiB7XHJcbiAgICAgICAgbmFtZTogc3RyaW5nXHJcbiAgICAgICAgdXJsOiBzdHJpbmdcclxuICAgIH1cclxufSJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL2xpYi9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFlUUGxheWxpc3Qge1xyXG4gICAgdGl0bGU6IHN0cmluZ1xyXG4gICAgdXJsOiBzdHJpbmdcclxuICAgIGlkOiBzdHJpbmdcclxuICAgIHZpZGVvX2NvdW50OiBudW1iZXJcclxuICAgIHZpZXdfY291bnQ/OiBudW1iZXJcclxuICAgIGRlc2NyaXB0aW9uOiBzdHJpbmdcclxuICAgIGlzVW5saXN0ZWQ6IGJvb2xlYW5cclxuICAgIHRodW1ibmFpbF91cmw6IHN0cmluZ1xyXG4gICAgYXV0aG9yOiB7XHJcbiAgICAgICAgbmFtZTogc3RyaW5nXHJcbiAgICAgICAgdXJsOiBzdHJpbmdcclxuICAgICAgICBhdmF0YXJfdXJsOiBzdHJpbmdcclxuICAgIH1cclxuICAgIHZpZGVvczogWVR2aWRlb1tdXHJcbn1cclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgWVR2aWRlbyB7XHJcbiAgICB0aXRsZTogc3RyaW5nXHJcbiAgICB1cmw6IHN0cmluZ1xyXG4gICAgaWQ6IHN0cmluZ1xyXG4gICAgbGVuZ3RoOiBzdHJpbmdcclxuICAgIG1pbGlzX2xlbmd0aDogbnVtYmVyXHJcbiAgICB0aHVtYm5haWxfdXJsOiBzdHJpbmdcclxuICAgIGF1dGhvcjoge1xyXG4gICAgICAgIG5hbWU6IHN0cmluZ1xyXG4gICAgICAgIHVybDogc3RyaW5nXHJcbiAgICB9XHJcbn0iXX0= |
{ | ||
"name": "ytfps", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "scraps youtube playlist metadata and all its videos (not limited to 100), does not require API key", | ||
@@ -5,0 +5,0 @@ "keywords": ["youtube", "playlist", "youtube playlist", "scraper", "yt"], |
const ytfps = require('../out/index'); | ||
const fs = require('fs'); | ||
const chai = require('chai'); | ||
@@ -10,30 +11,3 @@ chai.use(require('chai-as-promised')); | ||
const properResult = { | ||
title: 'testowa4ytfps', | ||
url: 'https://youtube.com/playlist?list=PLXJzeXpFb-pDFQSy6EK7JEFRM1b8I1TTW', | ||
id: myTestList, | ||
video_count: 1, | ||
description: 'this is a test', | ||
isUnlisted: true, | ||
thumbnail_url: 'https://i.ytimg.com/vi/2chfsFTNEXw/hqdefault.jpg', | ||
author: { | ||
name: 'アヌス', | ||
url: 'https://youtube.com/channel/UC2tC7wR16hJ5ddYpymiKdBQ', | ||
avatar_url: 'https://yt3.ggpht.com/a/AATXAJzo5HwQCdKBgZivys-2Kvbc2skKyPYKMaSyN_ci=s176-c-k-c0xffffffff-no-rj-mo' | ||
}, | ||
videos: [ | ||
{ | ||
title: "alternative songs to take a break from whatever you're listening now (maybe it'll help u)/ playlist", | ||
url: 'https://youtube.com/watch?v=2chfsFTNEXw', | ||
id: '2chfsFTNEXw', | ||
length: '2:02:10', | ||
milis_length: 7330000, | ||
thumbnail_url: 'https://i.ytimg.com/vi/2chfsFTNEXw/hqdefault.jpg', | ||
author: { | ||
name: "hasoyi", | ||
url: "https://youtube.com/channel/UCw_5z6HhKttOmcWgVgZ8tcg" | ||
} | ||
} | ||
] | ||
} | ||
const properResult = JSON.parse(fs.readFileSync('test/misc/properOutput.json')); | ||
@@ -40,0 +14,0 @@ describe("ytfps", function() { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32918
15
371
1