How would you read YouTube comments programmatically?

I would like to write a piece of software that when running in the background can read YouTube comments in the chat of a stream and then do something with them.

What’s the best way of doing this? Should I use C# or python or something else?

The youtube-dl project is an open-source youtube (and other video site) scraper.

You could use it as a starting point for fetching all the HTML associated with a video. Personally I would just clone it and make changes to it to find the comments; I would not bother porting such a thing to Unity.

Thanks, I hadn’t heard of that. I will check it out.

I tried using the YouTube LiveChatMessages API. And I got that working. However, there is a minium of 10,000 API calls per day. That might seem a lot, but I want to call it every second to check if there are any new messages. Which allows you about 2 hours and 45 minutes. So doing scraping from the live webpage might be a better solution.