from Hacker News

Ask HN: YouTube – how to batch scrape comments and details for 300 videos?

by pcf on 1/14/24, 1:24 PM with 3 comments

If I have a CSV file with links for over 300 YouTube videos, what are some good ways to safely save all comments below each one plus the uploader details?

It's super important to do it in a way that either a) prevents the Google account and/or IP address to be marked as a spammer or something, or b) can be done anonymously without a Google account.

There's no rush, so the process can be done slow enough to not trigger anything at YouTube/Google. It can e.g. be done in batches over some weeks, if that's necessary.

I'm not a great programmer, so the simpler/more automated, the better.

Any and all ideas are welcome. Thanks!

  • by PaulHoule on 1/14/24, 1:29 PM

    Could you delete the other copy of this question?

    I think you can get the questions for a video without being logged in so I think that part is no problem.

  • by toomuchtodo on 1/15/24, 5:34 AM

    yt-dlp --skip-download —-write-comments —-batch-file FILE (one url per line)

    https://github.com/yt-dlp/yt-dlp

  • by frendiversity on 1/14/24, 5:16 PM

    Ytdlp can probably do this