Anon
07/24/2021 (Sat) 11:38:36
No.7729
del
>>7727Hello and sorry for slow reply. I've been mainly looking on the /mlp/ thread and finally saw what appears to be someone from here.
Here are a couple scripts I've used on videos:
api_video_info.py is for getting the video metadata.
api_video_comments.py is for getting the video's comments.
common.py contains code shared by the other scripts.
Run it as such:
api_video_info.py -i videos.txt -d ./videos
api_video_comments.py -i videos.txt -d ./videos
-i flag is input file with videoIds (not full url). -d flag is relative directory to save to.
Any errors returned by the api goes to error.log.
I intended to have an --archive option similar to youtube-dl but we're short on time right now and I code very slow. Also there's at least one other thing I could've done to speed up the comments script but I'll have to implement that at a later date.
common.py also contains what appears to be the universal api key for youtube. Everyone running the scripts in /mlp/ have been using it without any problems, but I'd still suggest not hammering it too hard, especially for comments as it makes *a lot* of api calls when there are a lot of comments with replies.