ustvgo_to_m3u
ustvgo_to_m3u copied to clipboard
Autorun.sh fails with an "IndexError: list index out of range" error
As mentioned in the title, the autorun.sh script fails with the forementioned error and a blank m3u is generated
$ ./autorun.sh
grabbing the links...
#########################################################################
# ____ _ _ __ __ #
# | _ \ _ __ ___ (_) ___ ___| |_| \/ | ___ ___ ___ ___ #
# | |_) | '__/ _ \| |/ _ \/ __| __| |\/| |/ _ \ / _ \/ __|/ _ \ #
# | __/| | | (_) | | __/ (__| |_| | | | (_) | (_) \__ \ __/ #
# |_| |_| \___// |\___|\___|\__|_| |_|\___/ \___/|___/\___| #
# |__/ #
# >> https://github.com/benmoose39 #
#########################################################################
[*] Checking dependencies...
[*] Generating your playlist, please wait...
0%| | 0/102 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/user/Desktop/ustvgo_to_m3u/scripts/ustvgo_m3ugrabber.py", line 93, in <module>
grab(line)
File "/home/user/Desktop/ustvgo_to_m3u/scripts/ustvgo_m3ugrabber.py", line 59, in grab
getSample()
File "/home/user/Desktop/ustvgo_to_m3u/scripts/ustvgo_m3ugrabber.py", line 49, in getSample
novpn_sample = src.split("hls_src='")[1].split("'")[0]
IndexError: list index out of range
1%|▍ | 1/102 [00:00<01:09, 1.45it/s]
done
Debian unstable x64 with python 3.10.6, but the same happens on libreelec 10 stable that has python 3.8.9.
---edit As it seems, the page has changed and some channels that did not need a vpn, e.g. syfy, now they do. If possible, please renew the channels list as well, so that it mentions the new ones that need the vpn.
So I checked every channel. Out of the 102, only 3 (cnn, fox news and msnbc) work without the vpn!
will fix the channel info file
Although most files were updated, the script fails with the same error.
$ ./autorun.sh
grabbing the links...
#########################################################################
# ____ _ _ __ __ #
# | _ \ _ __ ___ (_) ___ ___| |_| \/ | ___ ___ ___ ___ #
# | |_) | '__/ _ \| |/ _ \/ __| __| |\/| |/ _ \ / _ \/ __|/ _ \ #
# | __/| | | (_) | | __/ (__| |_| | | | (_) | (_) \__ \ __/ #
# |_| |_| \___// |\___|\___|\__|_| |_|\___/ \___/|___/\___| #
# |__/ #
# >> https://github.com/benmoose39 #
#########################################################################
[*] Checking dependencies...
[*] Generating your playlist, please wait...
0%| | 0/112 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/user/Desktop/ustvgo_to_m3u-main/scripts/ustvgo_m3ugrabber.py", line 96, in <module>
grab(line)
File "/home/user/Desktop/ustvgo_to_m3u-main/scripts/ustvgo_m3ugrabber.py", line 59, in grab
getSample()
File "/home/user/Desktop/ustvgo_to_m3u-main/scripts/ustvgo_m3ugrabber.py", line 49, in getSample
novpn_sample = src.split("hls_src='")[1].split("'")[0]
IndexError: list index out of range
1%|▍ | 1/112 [00:00<01:26, 1.28it/s]
done
Now that I can "read" python (I started learning ~1 month ago), I think it is because the script takes ABC as a channel which does not require vpn and BET as a channel which does and then applies their cases to the rest. However, both those channels now require a vpn, which makes CNN the first channel in the list that can work without one, so what is done for ABC should be done for CNN.
I am 100% sure for that, because I have checked what other ustvgo-related scripts can do and I have contacted their authors since then. With their help, I concluded that a US ip (or a vpn that can provide one) is needed for the rest, so I gave up completely on anything that can give me an m3u for ustvgo. Sorry for not mentioning it earlier. I think it would be nice to put it on the readme for the rest of the non-US users.
Yep, ustvgo is only available to US IP
I agree on that, but, up until I opened the issue, the majority of its channels (e.g 70+ out of ~100) were available to non-US ips as well. For me, that made your set of scripts a reliable way of getting them in a handy m3u file. Sadly, this changed on late August and now only 3 of them are available. Even if I ever learn to code well in python, I won't correct the script just for 3 channels, and neither I expect you to do it.
I know you are not to blame, but this is how things are today. Have a nice day and thank you for everything, as long as it lasted :)
:) Join my discord if you can, we discuss stuff related to iptv https://discord.gg/dmgYmAEdee
Although I do not have a discord account, you just gave me a good reason to create one. I am keeping your server in case I get one in the future. Thank you very much :)
bypass for US ip is available now
Omg it worked! Thank you sooo much! It seems something more was needed, not just the change from ABC to CNN. Now I have to remember what kind of... alchemy I did to make it work on libreelec which completely lacks tqdm.
p.s. There are like 30+ channels that play a 30sec clip saying that the channel is not available right now. Is there a chance that they will work in the future? I have never seen that in the past.
Those channels require you to use nordvpn. But I'd say keep an eye on this repo.. Hopefully there will be a bypass to it too
Ok, honest question. I tested a couple of channels with mpv, other than the 3 above that do not need the vpn, and they all play like they used to. Why?
mpv?
This is mpv. I tested a couple of urls that I took straight from the generated m3u. https://mpv.io/
you mean they still don't work? channels than need nordvpn don't work at the moment (you'll see 'VPN' written towards the end of such channels in the info.txt file) The other channels that require you to use US IP address is solved. I do my testing on vlc and ott navigator and sometimes tivimate. Try vlc because it can play almost anything
The DO work, but they were not supposed to work because they need a vpn, e.g. syfy or animal planet! Unless something else has changed and I missed it. The site still shows they need a vpn. And I am not talking about 1 or 2 channels more than before, I am talking about 50+ more channels compared to the 3 channels that previously were available
If somehing is geoblocked, changing the player will not help anything. It will either be playable or not, regardless of which app plays it.
I'll leave it for you to figure out ;) Poor implementation of "geoblock" and hence a bypass. You'd love it on the discord btw