HermanFassett / youtube-scrape

Scrape YouTube searches (API)
MIT License
193 stars 96 forks source link

Failed to parse playlist couldn't read thumbnail #43

Open HermanFassett opened 3 years ago

HermanFassett commented 3 years ago

Seen this exception output in logs:

Failed to parse renderer: TypeError: Cannot read property 'thumbnail' of undefined
2020-11-12T04:37:17.125774+00:00 app[web.1]:     at parsePlaylistRenderer (/app/scraper.js:104:80)
2020-11-12T04:37:17.125774+00:00 app[web.1]:     at /app/scraper.js:53:59
2020-11-12T04:37:17.125775+00:00 app[web.1]:     at Array.forEach (<anonymous>)
2020-11-12T04:37:17.125776+00:00 app[web.1]:     at /app/scraper.js:41:70
2020-11-12T04:37:17.125776+00:00 app[web.1]:     at Array.forEach (<anonymous>)
2020-11-12T04:37:17.125776+00:00 app[web.1]:     at Request._callback (/app/scraper.js:39:87)
2020-11-12T04:37:17.125777+00:00 app[web.1]:     at Request.self.callback (/app/node_modules/request/request.js:185:22)
2020-11-12T04:37:17.125777+00:00 app[web.1]:     at Request.emit (events.js:314:20)
2020-11-12T04:37:17.125778+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/request/request.js:1154:10)
2020-11-12T04:37:17.125778+00:00 app[web.1]:     at Request.emit (events.js:314:20)
2020-11-12T04:37:17.127543+00:00 app[web.1]: {
2020-11-12T04:37:17.127546+00:00 app[web.1]:   playlistRenderer: {
2020-11-12T04:37:17.127547+00:00 app[web.1]:     playlistId: 'xxxxxx',
2020-11-12T04:37:17.127569+00:00 app[web.1]:     title: { simpleText: 'xxxxxx' },
2020-11-12T04:37:17.127570+00:00 app[web.1]:     thumbnails: [ [Object], [Object], [Object], [Object], [Object] ],
2020-11-12T04:37:17.127571+00:00 app[web.1]:     videoCount: '24',
2020-11-12T04:37:17.127571+00:00 app[web.1]:     navigationEndpoint: {
2020-11-12T04:37:17.127580+00:00 app[web.1]:       clickTrackingParams: 'xxxxxx',
2020-11-12T04:37:17.127580+00:00 app[web.1]:       commandMetadata: [Object],
2020-11-12T04:37:17.127581+00:00 app[web.1]:       watchEndpoint: [Object]
2020-11-12T04:37:17.127581+00:00 app[web.1]:     },
2020-11-12T04:37:17.127582+00:00 app[web.1]:     viewPlaylistText: { runs: [Array] },
2020-11-12T04:37:17.127582+00:00 app[web.1]:     shortBylineText: { simpleText: 'xxxxxx' },
2020-11-12T04:37:17.127583+00:00 app[web.1]:     publishedTimeText: { simpleText: 'Updated 5 days ago' },
2020-11-12T04:37:17.127583+00:00 app[web.1]:     videos: [ [Object], [Object] ],
2020-11-12T04:37:17.127583+00:00 app[web.1]:     videoCountText: { runs: [Array] },
2020-11-12T04:37:17.127584+00:00 app[web.1]:     trackingParams: 'xxxxxx',
2020-11-12T04:37:17.127584+00:00 app[web.1]:     thumbnailText: { runs: [Array] },
2020-11-12T04:37:17.127585+00:00 app[web.1]:     longBylineText: { simpleText: 'xxxxxx' },
2020-11-12T04:37:17.127585+00:00 app[web.1]:     thumbnailRenderer: { playlistCustomThumbnailRenderer: [Object] },
2020-11-12T04:37:17.127586+00:00 app[web.1]:     thumbnailOverlays: [ [Object], [Object], [Object] ]
2020-11-12T04:37:17.127586+00:00 app[web.1]:   }