Open pcktlwyrcode opened 3 years ago
I think this issue is due to copyrighted content in the video. Digging into the youtube-captions-scraper code you can see it gets data by using "https://youtube.com/get_video_info"
The videos with errors return "status=fail&errorcode=2&reason=Invalid+parameters."
Youtube's comment on this API states: https://developers.google.com/youtube/v3/docs/videos
All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each API project must undergo an audit to verify compliance with the Terms of Service. Please see the API Revision History for more details.
working: https://youtube.com/get_video_info?video_id=QJ3YfBMrVlsz not working: https://youtube.com/get_video_info?video_id=1AMYr01rkHE
Hello, I'm using this package in pipedream, is there to avoid error, when there are no captions in YouTube video?
ErrorCould not find captions for video: ejSm7B2gyk8 at null.null (/opt/ee/node_modules/youtube-captions-scraper/dist/index.js:21:48) at Generator.next (null:null:null) at null.step (/opt/ee/node_modules/youtube-captions-scraper/dist/index.js:103:191) at null.null (/opt/ee/node_modules/youtube-captions-scraper/dist/index.js:103:361) at process.processTicksAndRejections (internal/process/task_queues.js:95:5)
throw new Error(
Could not find captions for video: ${videoID}
); Error: Could not find captions for video: pR5q0ajW8Ko&has_verified=1This particular one has visible captions. I am wondering under what other circumstances this error may be thrown.