spaam / svtplay-dl

Small command-line program to download videos from some streaming sites.
https://svtplay-dl.se
MIT License
724 stars 122 forks source link

list index out of range - viafree.dk #1278

Closed MrMEEE closed 3 years ago

MrMEEE commented 3 years ago

svtplay-dl versions:

Run svtplay-dl --version svtplay-dl 2.7-4-gef557cb

Operating system and Python version:

CentOS 7 Python 3.6.8

What is the issue:

bash-4.2$ svtplay-dl --verbose https://www.viafree.dk/programmer/underholdning/luksusfaelden/saeson-10/episode-1

DEBUG [1605213506.7735102] /usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py/get_media: version: 2.7-4-gef557cb DEBUG [1605213506.7752008] /usr/local/bin/svtplay-dl/svtplay_dl/service/init.py/init: service: viaplay DEBUG [1605213506.7752464] /usr/local/bin/svtplay-dl/svtplay_dl/utils/http.py/request: HTTP getting 'https://www.viafree.dk/programmer/underholdning/luksusfaelden/saeson-10/episode-1' DEBUG [1605213506.776698] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): www.viafree.dk:443 DEBUG [1605213508.3208778] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_make_request: https://www.viafree.dk:443 "GET /programmer/underholdning/luksusfaelden/saeson-10/episode-1 HTTP/1.1" 200 24895 DEBUG [1605213508.3435688] /usr/local/bin/svtplay-dl/svtplay_dl/utils/http.py/request: HTTP getting 'https://viafree.mtg-api.com/identity/viafree/auth/pwd/sessions' DEBUG [1605213508.3444514] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): viafree.mtg-api.com:443 DEBUG [1605213508.5201812] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_make_request: https://viafree.mtg-api.com:443 "POST /identity/viafree/auth/pwd/sessions HTTP/1.1" 200 None DEBUG [1605213508.5214584] /usr/local/bin/svtplay-dl/svtplay_dl/utils/http.py/request: HTTP getting 'https://viafree.mtg-api.com/stream-links/viafree/web/dk/clear-media-guids/S74058/streams' DEBUG [1605213508.598867] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_make_request: https://viafree.mtg-api.com:443 "GET /stream-links/viafree/web/dk/clear-media-guids/S74058/streams HTTP/1.1" 200 630 DEBUG [1605213508.5992775] /usr/local/bin/svtplay-dl/svtplay_dl/utils/http.py/request: HTTP getting 'https://vod6-hls-cdn1-vf-cdn-viaplay-tv.akamaized.net/74bfd41/S74058-1532875603595.ism/master.m3u8?start_index=1&filter=%28type%3D%3D%22audio%22%26%26%28FourCC%3D%3D%22AACL%22%29%29%7C%7C%28type%3D%3D%22video%22%26%26FourCC%3D%3D%22AVC1%22%29%7C%7C%28type%3D%3D%22textstream%22%29&hdnts=st=1605213448~exp=1605299908~acl=*~hmac=06663683410398c03ce6f4c8b6c14b8a63e9ebfbdbaddbdd0fb588117045661a' DEBUG [1605213508.600415] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): vod6-hls-cdn1-vf-cdn-viaplay-tv.akamaized.net:443 DEBUG [1605213509.2095263] /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py/_make_request: https://vod6-hls-cdn1-vf-cdn-viaplay-tv.akamaized.net:443 "GET /74bfd41/S74058-1532875603595.ism/master.m3u8?start_index=1&filter=%28type%3D%3D%22audio%22%26%26%28FourCC%3D%3D%22AACL%22%29%29%7C%7C%28type%3D%3D%22video%22%26%26FourCC%3D%3D%22AVC1%22%29%7C%7C%28type%3D%3D%22textstream%22%29&hdnts=st=1605213448~exp=1605299908~acl=*~hmac=06663683410398c03ce6f4c8b6c14b8a63e9ebfbdbaddbdd0fb588117045661a HTTP/1.1" 200 None Traceback (most recent call last): File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/bin/svtplay-dl/main.py", line 15, in File "/usr/local/bin/svtplay-dl/svtplay_dl/init.py", line 66, in main File "/usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 61, in get_media File "/usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 111, in get_one_media File "/usr/local/bin/svtplay-dl/svtplay_dl/service/viaplay.py", line 79, in get IndexError: list index out of range

This works on almost every other thing on viafree.dk.. but not on these???

MrMEEE commented 3 years ago

This one works:


#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform(version=1.9.5)

# AUDIO groups
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-aacl-96",NAME="Danish",LANGUAGE="da",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="20592573-1571656167159-audio_dan_2=96000.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"

# variants
#EXT-X-STREAM-INF:BANDWIDTH=423000,CODECS="mp4a.40.2,avc1.4D4015",RESOLUTION=512x288,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=307223.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3
#EXT-X-STREAM-INF:BANDWIDTH=261000,CODECS="mp4a.40.2,avc1.4D400C",RESOLUTION=320x180,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=154100.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3
#EXT-X-STREAM-INF:BANDWIDTH=717000,CODECS="mp4a.40.2,avc1.4D401E",RESOLUTION=640x360,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=584589.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3
#EXT-X-STREAM-INF:BANDWIDTH=1258000,CODECS="mp4a.40.2,avc1.4D401F",RESOLUTION=960x540,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=1094719.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3
#EXT-X-STREAM-INF:BANDWIDTH=2012000,CODECS="mp4a.40.2,avc1.4D401F",RESOLUTION=1280x720,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=1806088.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3
#EXT-X-STREAM-INF:BANDWIDTH=4130000,CODECS="mp4a.40.2,avc1.640029",RESOLUTION=1920x1080,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=3803854.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3

# variants
#EXT-X-STREAM-INF:BANDWIDTH=97000,CODECS="mp4a.40.2",AUDIO="audio-aacl-96"
20592573-1571656167159-audio_dan_2=96000.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3

# keyframes
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=21000,CODECS="avc1.4D400C",RESOLUTION=320x180,URI="keyframes/20592573-1571656167159-video=154100.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=41000,CODECS="avc1.4D4015",RESOLUTION=512x288,URI="keyframes/20592573-1571656167159-video=307223.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=78000,CODECS="avc1.4D401E",RESOLUTION=640x360,URI="keyframes/20592573-1571656167159-video=584589.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=146000,CODECS="avc1.4D401F",RESOLUTION=960x540,URI="keyframes/20592573-1571656167159-video=1094719.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=240000,CODECS="avc1.4D401F",RESOLUTION=1280x720,URI="keyframes/20592573-1571656167159-video=1806088.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=505000,CODECS="avc1.640029",RESOLUTION=1920x1080,URI="keyframes/20592573-1571656167159-video=3803854.m3u8?hdntl=exp=1605312078~acl=*~hmac=0fb75533b7e3b95d5e71af0c9ff1182256c5caddf372c2bbb5ed8f9c6547a4a3"```

This one doesn't

#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform(version=1.9.5)

# AUDIO groups
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-aacl-96",NAME="Danish",LANGUAGE="da",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="20592573-1571656167159-audio_dan_2=96000.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"

# variants
#EXT-X-STREAM-INF:BANDWIDTH=423000,CODECS="mp4a.40.2,avc1.4D4015",RESOLUTION=512x288,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=307223.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1
#EXT-X-STREAM-INF:BANDWIDTH=261000,CODECS="mp4a.40.2,avc1.4D400C",RESOLUTION=320x180,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=154100.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1
#EXT-X-STREAM-INF:BANDWIDTH=717000,CODECS="mp4a.40.2,avc1.4D401E",RESOLUTION=640x360,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=584589.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1
#EXT-X-STREAM-INF:BANDWIDTH=1258000,CODECS="mp4a.40.2,avc1.4D401F",RESOLUTION=960x540,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=1094719.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1
#EXT-X-STREAM-INF:BANDWIDTH=2012000,CODECS="mp4a.40.2,avc1.4D401F",RESOLUTION=1280x720,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=1806088.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1
#EXT-X-STREAM-INF:BANDWIDTH=4130000,CODECS="mp4a.40.2,avc1.640029",RESOLUTION=1920x1080,FRAME-RATE=25,AUDIO="audio-aacl-96",CLOSED-CAPTIONS=NONE
20592573-1571656167159-video=3803854.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1

# variants
#EXT-X-STREAM-INF:BANDWIDTH=97000,CODECS="mp4a.40.2",AUDIO="audio-aacl-96"
20592573-1571656167159-audio_dan_2=96000.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1

# keyframes
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=21000,CODECS="avc1.4D400C",RESOLUTION=320x180,URI="keyframes/20592573-1571656167159-video=154100.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=41000,CODECS="avc1.4D4015",RESOLUTION=512x288,URI="keyframes/20592573-1571656167159-video=307223.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=78000,CODECS="avc1.4D401E",RESOLUTION=640x360,URI="keyframes/20592573-1571656167159-video=584589.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=146000,CODECS="avc1.4D401F",RESOLUTION=960x540,URI="keyframes/20592573-1571656167159-video=1094719.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=240000,CODECS="avc1.4D401F",RESOLUTION=1280x720,URI="keyframes/20592573-1571656167159-video=1806088.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=505000,CODECS="avc1.640029",RESOLUTION=1920x1080,URI="keyframes/20592573-1571656167159-video=3803854.m3u8?hdntl=exp=1605312130~acl=*~hmac=b2251eb251171578560ecb5cdbccc7cee736a09ffe929410dfef3379af5810c1"```

Can't really see the difference??
spaam commented 3 years ago

did you forget to post the whole error message in the first post? when i run it i get

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/johan/dev/svtplay-dl-dev/lib/svtplay_dl/__main__.py", line 15, in <module>
    svtplay_dl.main()
  File "/Users/johan/dev/svtplay-dl-dev/lib/svtplay_dl/__init__.py", line 66, in main
    get_media(urls[0], config, __version__)
  File "/Users/johan/dev/svtplay-dl-dev/lib/svtplay_dl/utils/getmedia.py", line 61, in get_media
    get_one_media(stream)
  File "/Users/johan/dev/svtplay-dl-dev/lib/svtplay_dl/utils/getmedia.py", line 111, in get_one_media
    for i in streams:
  File "/Users/johan/dev/svtplay-dl-dev/lib/svtplay_dl/service/viaplay.py", line 79, in get
    yield subtitle(copy.copy(self.config), "wrst", janson["embedded"]["subtitles"][0]["link"]["href"], output=self.output)
IndexError: list index out of range

based on that. it seems that the info about the subtitles changed to include a empty list that im trying to access. i have commited a fix for the error i saw. it will be in the latest snapshots soon. i will release a new version with the fix tonight with other stuff :)

MrMEEE commented 3 years ago

cool.. just tried.. it works great...

Thanks

MrMEEE commented 3 years ago

But I didn't get the same error as you before??? weird.. must be something to do with the versions of python or deps