Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates twitch-viewer.py for Python 3.6.11 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updates twitch-viewer.py for Python 3.6.11 #15

wants to merge 1 commit into from

Conversation

justinharkey
Copy link

No description provided.

@justinharkey
Copy link
Author

@peacedink Yes this works perfectly for me. Newer versions of Python require parentheses around print.

@peacedink
Copy link

@justinharkey but do you get more than 20 viewers by using this? Cuz im limited to that amount everytime.

@mufin695
Copy link

I keep getting

An error has occurred while trying to read the list of proxies: no such file or directory

heres what my folder looks like

# viewer

  • twitch-viewer.py
  • proxylist.txt

any ideas?

@peacedink
Copy link

@mufin695 move your proxies to C:/proxylist.txt and change path in script to C:/proxylist.txt instead of proxylist.txt

@mufin695
Copy link

@peacedink Got it to work! is it just me or do the views cap out at 20?

@peacedink
Copy link

@mufin695 nope, same for me

@mufin695
Copy link

@peacedink yeah im guessing twitch only allows 20 non-registered viewers

@1ben99
Copy link

1ben99 commented Apr 3, 2017

@mufin695 How did you resolve the "An error has occurred while trying to read the list of proxies: No such file or directory" issue I have the same issue and can't seem to solve it?

Resolved the issue but now I get this issue:
"Obtaining the channel...
Obtained the channel
Preparing the processes...
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\python27\Scripts\livestreamer.exe_main
.py", line 5, in
File "c:\python27\lib\site-packages\livestreamer_cli\main.py", line 14, in
from livestreamer import (Livestreamer, StreamError, PluginError,
ImportError: cannot import name Livestreamer
An error has occurred while trying to get the stream data. Is the channel online? Is the channel name correct?"

I have even added my own client id which is d11517mart29mlb0xzq3svd2tvcfbqd11517mart29mlb0xzq3svd2tvcfbq if anyone wants to test it?

@mufin695
Copy link

@peacedink Ever figure the 20 viewer thing out?

@SrGeekPT
Copy link

Getting error in this try

try: url = json.loads(response)['streams']['audio']['url'] except (ValueError, KeyError): print("LN66: An error has occurred while trying to get the stream data. Is the channel online? Is the channel name correct?") sys.exit(1)

@Volantino
Copy link

This still work in the 2018?
Anyone use it?

@Thehackmen
Copy link

Where do I download the bot files

@virtuoz75
Copy link

I think this program doesn't work anymore

@virtuoz75
Copy link

NVM i've tried it the script is working with @justinharkey changes Did this command to launch it :

On powershell :

cd YOURSCRIPTFOLDER
.\twitch-viewer.py YOURCHANNAME

Hope this can help

@virtuoz75
Copy link

You just have to add parse in the code like justin do

For the proxy, I've taken a list from internet searches, you need to find your own

@virtuoz75
Copy link

You dont need to modify this line :

channel_url = "twitch.tv/yogscast"

Just change it to:

channel_url = "twitch.tv/"

And try again

@virtuoz75
Copy link

The problem is not the proxy atm, the channel you specified is streaming? it seems that its disconnected

@virtuoz75
Copy link

Hmm, i don't where the problem is so ..

@virtuoz75
Copy link

Come to my discord and i will pm you : https://discord.gg/RrTxbK

@MrHappy8D
Copy link

Come to my discord and i will pm you : https://discord.gg/RrTxbK

@virtuoz75 would you mind running me through what you did to make this work? I'm having similar issues from the error : "An error has occurred while trying to get the stream data. Is the channel online? Is the channel name correct?"

@Steelsector
Copy link

I would like to know the answer as well, please

@MrHappy8D
Copy link

I have actually solved this and got the script to work (with marginal success...) I can get to a maximum of 10 viewers with the number of proxies i'm using (they're ones i've found online in a couple shady forums). I'll try post a fork when I can if anyone's interested...

@s4magier
Copy link

s4magier commented Jan 8, 2019

I got the script running too but its not counting the viewers

@Steelsector
Copy link

Yep, interested @MrHappy8D, I don't know what I'm doing wrong at this point

@s4magier
Copy link

s4magier commented Jan 9, 2019

@MrHappy8D i am interested too. Which setting for the sleep timeouts are you using?

@MrHappy8D
Copy link

MrHappy8D commented Jan 9, 2019

Add me on discord and i'll send through the file. MrHappy8D#5798. I don't go on github much and cbf setting something up. Maybe we can figure it out together.

I saw you managed to remove dead proxies that don't connect which is awesome @s4magier. Like I said I managed to get 10 viewers with some shitty proxy list I found so I'm sure it's possible to get more but the list would need to be huge... I also had to have the script running for quite some time.

@MrHappy8D
Copy link

MrHappy8D commented Jan 9, 2019

I also forked the branch and modified the script. You'll need to update the code and replace CHANNELNAME on line 28. Then just run the script as python twitch-viewer.py in CMD as Administrator. You'll also need a long list of proxies (LONG LIST) and a lot of them won't connect unless they're good / Residential proxies. It would be good if we could auto remove proxies that don't connect. There are a couple forums I know who share a list of proxies everyday that seem better quality than free ones.

https://github.com/MrHappy8D/twitch-viewer

@s4magier
Copy link

s4magier commented Jan 9, 2019

So i reviewed your code and it is similar to mine. Strange that it doesnt count the viewers for me. I am using Ubuntu tho but this should not be the problem.

What is your Discord ID?

@MrHappy8D
Copy link

Should be MrHappy8D#5798 @s4magier. I had to have a massive proxy list and the list I have there is probably outdated already on my branch. May be able to source some fresher ones.

@jormanen
Copy link

I keep getting "An error has occurred while trying to read the list of proxies: No such file or directory" even when i have the proxylist.txt on the folder... Any tips how i could make it work?

@vanarok
Copy link

vanarok commented Jun 11, 2019

An error has occurred while trying to get the stream data. Is the channel online? Is the channel name correct? What?

@selfpromochat
Copy link

@jormanen Same here. Have you figured anything out

@plzteachmesensei
Copy link

plzteachmesensei commented Feb 20, 2020

hey ive been looking for a year on how to make a viewers / chat bot program can someone please help me with this i am somewhat new to python but i did find a script in github i believe MrHappy8D is the one i found on there btw @MrHappy i have sent u a friend request on discord plz add me also if anybody else knows how to create one are has script that works and knows how to install/ setup and doesnt mind walking me through it i would greatly apprecate it and could maby paypal you a lil money for helping me greatly

@virtuoz75
Copy link

virtuoz75 commented Feb 27, 2020

Hey @plzteachmesensei. I was able to make this script work few month ago now its gone, still have the "An error has occurred while trying to get the stream data. Is the channel online? Is the channel name correct?" Did you managed to make it work?

@plzteachmesensei
Copy link

plzteachmesensei commented Feb 27, 2020 via email

@virtuoz75
Copy link

I'm sorry I really don't know what to change to make it work

@brunomaffei
Copy link

someone get it work?
Please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.