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

ValueError: invalid literal for int() with base 10 #25

Open
Coloradohusky opened this issue Aug 8, 2022 · 4 comments
Open

ValueError: invalid literal for int() with base 10 #25

Coloradohusky opened this issue Aug 8, 2022 · 4 comments
Labels
need further information Replied with further information needed

Comments

@Coloradohusky
Copy link

Running on Windows 10, using Python 3.8.2. Trying to use on iptv-org.github.io m3us, but to no avail.

C:\Users\Coloradohusky\Downloads\IPTV>iptv-filter -i https://iptv-org.github.io/iptv/languages/cat.m3u
https://videos.rtva.ad/live/rtva/playlist.m3u8, Inaccessible (No connectivity)!
http://ventdelnord.tv:8080/girona/directe.m3u8, Inaccessible (No connectivity)!
http://ventdelnord.tv:8080/escala/directe.m3u8, Inaccessible (No connectivity)!
http://5.255.90.184:2002/play/a01z, Inaccessible (No connectivity)!
https://cdnlive.shooowit.net/25televisiolive/smil:channel1.smil/master.m3u8, OK!
https://cdnapisec.kaltura.com/p/2346171/sp/234617100/playManifest/entryId/1_n6442jz0/format/applehttp/.m3u8?referrer=aHR0cHM6Ly9iZXRldmUuY2F0, OK!
https://bcovlive-a.akamaihd.net/1e7e91116b104391a4f22e13a694d94f/eu-central-1/6057955885001/playlist_dvr.m3u8, Inaccessible (No connectivity)!
100%|####################################################################################| 7/7 [00:31<00:00,  4.49s/it]
Traceback (most recent call last):
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\Scripts\iptv-filter.exe\__main__.py", line 7, in <module>
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\lib\site-packages\iptvtools\iptv_filter.py", line 75, in main
    playlist.export()
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\lib\site-packages\iptvtools\models.py", line 42, in export
    for url in sorted(self.data, key=self.__custom_sort):
  File "C:\Users\Coloradohusky\AppData\Local\Programs\Python\Python38\lib\site-packages\iptvtools\models.py", line 175, in __custom_sort
    res.append(int(entry['params'].get(key) or sys.maxsize))
ValueError: invalid literal for int() with base 10: '25TV.es'

The line in question (see 'tvg-id'):

#EXTINF:-1 tvg-id="25TV.es" tvg-logo="https://i.imgur.com/sADbx7S.png" group-title="Undefined",25 TV (480p) [Not 24/7]
https://cdnlive.shooowit.net/25televisiolive/smil:channel1.smil/master.m3u8
@Coloradohusky
Copy link
Author

Also broken on Python 3.10.6 (just updated versions)

@Coloradohusky
Copy link
Author

Why is tvg-id being converted into an int? Program seems to work great w/o the casting

@huxuan
Copy link
Owner

huxuan commented Sep 4, 2022

We convert tvg-id to int for sorting, so that channels with tvg-id 1, 10, 2 will be sorted properly. But it is OK to make this part more robust. I will make a path soon.

@huxuan
Copy link
Owner

huxuan commented Sep 4, 2022

Please help to check whether version 0.2.10 fix the problem.

P.S. I still want to keep the feature of sorting by numeric tvg-id, so the changes is more like a hack instead.

@huxuan huxuan added the need further information Replied with further information needed label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need further information Replied with further information needed
Projects
None yet
Development

No branches or pull requests

2 participants