egbertbouman / youtube-comment-downloader

Simple script for downloading Youtube comments without using the Youtube API
MIT License
881 stars 223 forks source link

Modify search_dict to be slightly faster #130

Closed Vizonex closed 1 year ago

Vizonex commented 1 year ago

I have actually made a bunch of versions of this comment downloader before based off of this code in the past and I was wondering as well if you wanted to see about using httpx in the future instead of requests since httpx has http-2 support and YouTube has http-2 support as well which may increase performance.

egbertbouman commented 1 year ago

I agree that using extend is much better than using append. Thanks!

Regarding httpx, I'm not sure how much the script would benefit from HTTP/2 since it's not requesting any additional resources beyond html. Besides, we have to wait for a while after each request to avoid Youtube blocking us.

Vizonex commented 1 year ago

You're welcome. I'm glad I know now why things are the way that they are. Thanks for the explanation I appreciate it.