Close

Getting YouTube chat data:

A project log for Control My Lights

Control My Lights using a website, Twitch chat, YouTube chat. controlmylights.net

edward-c-deaver-ivEdward C. Deaver, IV 10/16/2020 at 20:270 Comments

Another data source I wanted was YouTube chat, but found a big issue with it. You are only given 10,000 credits to use on the API for every 24 hours. With each read of the polling based API (not a modern real-time streaming API like Twitch) it costs 1 credit. After running the numbers I would burn through that API limit in ~2.5 hours. So I moved to using Selenium with Chrome webdriver to load the chat data. This posed some issues that can be read about here. The best part about this method is it loads the site once, queries the DOM elements, and streams the data to my internal router. All of the hashing of usernames that happens on the Twitch Bot happens here, as well*. Also, due to Python using “False” for boolean false which differs from JavaScripts “false”, I had to add code on the nodejs side to deal with this. * Note this would change dramatically by the end of the program. The hashing is moved to the individual components.

Discussions