spaam/svtplay-dl

Cannot download series from tv4play

Closed this issue · 11 comments

What is the issue:

Downloading using the -A switch doesn't work on tv4play anymore, when downloading series. (it works on single shows/movies, but trying to download all episodes does not work anymore, which is very annoying when having shows with lots of (small) episodes (like 30+) !
examples and url:
(having set the user and password in the .HOME/.svtplay-dl.yaml file as mentioned elsewhere, in the issue before):
svtplay-dl -A --verbose https://www.tv4play.se/program/7553278e8b716e5f5928/idol
or with user credentials:
svtplay-dl -A -u someuser -p somepass https://www.tv4play.se/program/7553278e8b716e5f5928/idol

OUTPUT:
... .pyenv/versions/3.6.5/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "home/bin/svtplay-dl/main.py", line 15, in
File "home/bin/svtplay-dl/svtplay_dl/init.py", line 69, in main
File "home/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 61, in get_media
File "home/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 79, in get_all_episodes
File "home/bin/svtplay-dl/svtplay_dl/service/tv4play.py", line 136, in find_all_episodes
KeyError: 'allSeasonLinks'

(- got one slightly different error using direct episode url also:)
.pyenv/versions/3.6.5/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
/home/bin/svtplay-dl/svtplay_dl/service/tv4play.py", line 131, in find_all_episodes
File "home/bin/svtplay-dl/svtplay_dl/service/tv4play.py", line 178, in _get_seriesid
KeyError: 'series'

END-OUTPUT

This stopped working after tv4play updated its website some weeks or months ago, and any newer version of this excellent util does not seem to handle or mention this!

svtplay-dl versions:4.24

Operating system and Python version:

Name and version of the operating system and python version (run python --version)
python: 3.6.5

can you try using the latest version 4.25 and see if it works better?

can you try using the latest version 4.25 and see if it works better?

I did now, and it works! Perfect as before!

Sorry to file an unnecessary issue, I just assumed since no mention of it, it wouldn't have changed.

its okey. 4.25 have an issue that you cant use -A on a video. you need to use the program page like you did in your first post FYI :) it will be fixed later this week.

Hi, I have the same issue. But for me, it's not resolved by updating to 4.25.

C:\Users\s>c:\svtplay-dl\svtplay-dl.exe -S -f --format-preferred=hevc-51,h264-51,hevc,h264 -u stefner@gmail.com -p xxxxxx "https://www.tv4play.se/video/20120ba8d74b29778793/det-här-är-min-dröm"
ERROR: No videos found. You need username / password.

C:\Users\s>c:\svtplay-dl\svtplay-dl.exe -S -f --format-preferred=hevc-51,h264-51,hevc,h264 --user=stefner@gmail.com --password=xxxxxx "https://www.tv4play.se/video/20120ba8d74b29778793/det-här-är-min-dröm"
ERROR: No videos found. You need username / password.

C:\Users\s>c:\svtplay-dl\svtplay-dl.exe --version
svtplay-dl 4.25

@stefner

svtplay-dl.exe https://www.tv4play.se/video/20120ba8d74b29778793/det-här-är-min-dröm
INFO: Outfile: idol.s19e01.idol.del.1-det.har.ar.min.drom-20120ba8d74b29778793-tv4play.srt
INFO: Outfile: idol.s19e01.idol.del.1-det.har.ar.min.drom-20120ba8d74b29778793-tv4play.ts
INFO: Selected to download hls, bitrate: 7027 format: h264
[240/695][===========================.....................................................] ETA: 0:00:13

I'm using a config file, but you can see it is working.

Do you have any strange characters in your password?

So, it works for you (user/password not required)!
Hmm...

Yesterday, I removed my standard python38 installation (installed 3.11 and got rid of several old versions).
(3.11 works fine.)
I downloaded svtplay 4.25 today.

Well, I'll try to investigate further, starting with testing download from other sites (SVT, ...)

Thanks

Btw, No strange chars in my password

Btw 2: Turns out that SVT works fine.

Maybe this is not relevant, but in the below, what are "C:\hostedtoolcache" and "D:\a"? I have those disks, but not the directories...

C:\Users\s>c:\svtplay-dl\svtplay-dl.exe --verbose -u stefner@gmail.com -p xxxx "https://www.tv4play.se/video/d7995e2549aa7ea0397e/han-tog-henne-till-skogen"
DEBUG [1693509022.269405] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_media: version: 4.25
DEBUG [1693509022.2714033] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\service_init_.py/init: service: tv4play
DEBUG [1693509022.2714033] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://www.tv4play.se/video/d7995e2549aa7ea0397e/han-tog-henne-till-skogen'
DEBUG [1693509022.277928] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): www.tv4play.se:443
DEBUG [1693509022.4099412] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://www.tv4play.se:443 "GET /video/d7995e2549aa7ea0397e/han-tog-henne-till-skogen HTTP/1.1" 200 None
DEBUG [1693509022.4299445] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://avod-auth-alb.a2d.tv/oauth/authorize'
DEBUG [1693509022.4339437] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): avod-auth-alb.a2d.tv:443
DEBUG [1693509022.8032424] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://avod-auth-alb.a2d.tv:443 "POST /oauth/authorize HTTP/1.1" 401 60
ERROR [1693509022.804242] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_one_media: No videos found. You need username / password.

@stefner those are there because you are using windows and using svtplay-dl.exe. those directories was created when i made that .exe file.

So, it works for you (user/password not required)!

@stefner Username and password are required, but i have those in the config file.

You can create a config file and you don't need to enter the options every time you download.

You don't need to install any python in Windows. Python is included in the svtplay-dl package.

@Sopor, spaam
Got it working by changing the password when logged into tv4play.se in my Chrome browser.
I changed it to the one saved in Google, which was the one that I thought was used when logging in the browser login.
Conclusion: I was wrong, and there was no issue with svtplay-dl.
Sorry for the confusion, and thanks for your help.
/stefner

this should be fixed in 4.25 and 4.26