mathsgrinds / ustvnow-iptv-m3u-playlist

Using your login details this script can grab the m3u8 links from the USTVNOW website
29 stars 26 forks source link

where to enter variables #2

Closed maaamark closed 7 years ago

maaamark commented 7 years ago

where do we replace the variables? 'username' 'password' 'token'? I'm receiving the following when running the script

python main.py Traceback (most recent call last): File "main.py", line 58, in print Ustvnow("YOUR USERNAME", "YOUR PASSWORD") File "main.py", line 14, in Ustvnow token = j['UJKF8EICENSOREDD03B7A874E708444B2FF'] KeyError: 'UJKF8EICENSORED03B7A874E708444B2FF'

mathsgrinds commented 7 years ago

Hi friend, just replace “Your Username” with your username and “Your Password” with your password (at the end of the script) and then run the scripts. Everything else is taken care of by the python script.

So Ustvnow("YOUR USERNAME", "YOUR PASSWORD") becomes Ustvnow(“johnsmith@example.com”, “mypassword123”)

J

christinhend95 commented 7 years ago

Hi, I get an error after replacing “Your Username” and “Your Password” with my username and password. When I run the main.py script, that's what I get

File "main.py", line 58 print Ustvnow(".....", ".....")

SyntaxError: invalid syntax

jacknight commented 7 years ago

@christinhend95 Are you sure your quotes are standard quotes and not, say, something you would find in a Rich Text Formatted file? my best guess... hard to see anything wrong from what you've posted.

christinhend95 commented 7 years ago

@jacknight Thanks for your reply. Bear with me, as I'm really a newbie at this. I'm not sure what you mean. All I did was open the main.py file in a text editor and fill in my username and password. I didn't replace the quotes, just YOUR USERNAME and YOUR PASSWORD

christinhend95 commented 7 years ago

Ok, problem solved, never mind... I sort of did a python crash course and installed the requests and beautifulsoup modules which were missing and now all is fine. I just tested the script and got all the links :)

maaamark commented 7 years ago

Thanks mathsgrinds. works great.

mathsgrinds commented 7 years ago

If you are using a newer version of Python you may need to use this instead

print(Ustvnow(".....", "....."))

someone told me print was changed recently.

christinhend95 commented 7 years ago

@mathsgrinds thanks for the tip. I was indeed using a newer version, so I downgraded to 2.7, installed those modules and, like I said, it works like a charm now. Thanks again for this wonderful script. One question though: I don't seem to get all the links for the seven channels, I mean one of them gets repeated several times for different channels. Why is it? Furthermore, do you have any idea why none of the streams will play in Vlc? They are all fine in Mx player on all my Android devices and on my smart TV as well, but I just can't get Vlc to handle them.

mathsgrinds commented 7 years ago

Hi, yeah, I don't know, I tried using VLC for recording and viewing and just didn't find it to work really well (or not at all).

christinhend95 commented 7 years ago

Ok, thanks. And how about the replicated links? For example, I just ran the script and only got two different streams, one for abc and another for cbs, while the rest all have the same link as cbs, so in essence I will only get two channels. Do you get seven unique links whenever you run the script? If so, what am I doing wrong?

mathsgrinds commented 7 years ago

Oh thanks J I would not have noticed that! I fixed the code.

christinhend95 commented 7 years ago

Yes, now it's perfect. Thanks for fixing it! Just a curiosity, would it be difficult/impossible to have a similar script that also grabs the ustvnow recordings? They are also m3u8 streams that look very much like the live channels' links.

mathsgrinds commented 7 years ago

Hi J hmmm not sure, I don’t have a DVR account. I use crontab with ffmpeg to set my own recordings of live shows.

christinhend95 commented 7 years ago

If it's a hassle, never mind then... Meanwhile, I got the links to work in Vlc as well. Thanks again for this wonderful script.

cellhelp commented 7 years ago

HI. Is there a reason why I have to wait 1 hour to get the keys working. I get file not found in the first hour?