Cagin Donmez (cd0x23) | 24/05/2016
So I got bored last night and played around with faking Twitch viewers. I've failed to actually find a practical way to do this but, switching on to Eric Zhang's method, I've been able to get "acceptable (aka "meh") results.
The issue is that Twitch uses HLS for streaming and limits 10 connections per IP. Any more than 10 connections are not counted as viewers on stream. So what I did was, I added proxies, but this also was no good because good luck finding free proxies capable of sending requests every 5 seconds. However premium proxies is worth giving a shot and might actually work.
There's also another issue with CPU usage. I've tested the script with 3 builder threads on my low-end Digitalocean server.
As you can see the CPU usage spikes around 90% while there's no noticable change in bandwidth usage, which is odd because one would think that bandwidth would be the bottleneck in this case. I should also note that I personally don't think this method is practical as well (unless you have awesome hardware) since this test costs such processing power only for 10 viewers. If you want more viewers you're gonna have to use premium speed proxies and much more threads running this code.
The main reason I'm writing this is actually seeing a lot of people having a hard time running the code mainly because it's outdated. The code I'm posting is updated and tested on both Windows and Ubuntu 14.04. I've also added a proxy option.
You need to meet these requirements to be able to run this code properly.
- livestreamer
- requests
- pyopenssl
- urllib3
###Troubleshooting If you're having parsing errors, you might want to check if livestreamer module is working properly. Also switching to "simplejson" to see a better error message might help too.
You need to modify the number of threads according to your hardware and needs or you might experience threading errors.
did twitch brick this with new updates? Livestreamer not working?