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

tv4play's token exchange has problems #1647

Open
mjoberg opened this issue Oct 7, 2024 · 9 comments
Open

tv4play's token exchange has problems #1647

mjoberg opened this issue Oct 7, 2024 · 9 comments

Comments

@mjoberg
Copy link

mjoberg commented Oct 7, 2024

svtplay-dl versions:

svtplay-dl 4.97.1-2-g85d9346

Operating system and Python version:

Windows 10 22H2 19045.4957
Python 3.8

What is the issue:

$ ./svtplay-dl.exe -S --verbose --token eyJhbGciOiJFUzI1NiIsImtp https://www.tv4play.se/video/58284de18c119b5455ac/avsnitt-1-an-anxious-aunt
DEBUG [1728312866.6202374] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_media: version: 4.97.1-2-g85d9346
DEBUG [1728312866.6222315] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\service_init_.py/init: service: tv4play
DEBUG [1728312866.6222315] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://www.tv4play.se/video/58284de18c119b5455ac/avsnitt-1-an-anxious-aunt'
DEBUG [1728312866.6251996] 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 [1728312866.7239351] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://www.tv4play.se:443 "GET /video/58284de18c119b5455ac/avsnitt-1-an-anxious-aunt HTTP/11" 200 None
DEBUG [1728312866.7418878] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://avod-auth-alb.a2d.tv/oauth/refresh'
DEBUG [1728312866.7438824] 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 [1728312866.8316474] 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/refresh HTTP/11" 403 395
ERROR [1728312866.832646] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_one_media: No videos found. You need a token to access the website. see https://svtplay-dl.se/tv4play/

@spaam
Copy link
Owner

spaam commented Oct 7, 2024

first please logout and login from tv4play. please dont share your token. its a private thing.

are you sure you copy the whole token? feels like you didnt do that.

@spaam spaam closed this as completed Oct 7, 2024
@spaam spaam reopened this Oct 7, 2024
@SweDennis
Copy link

Token in OP is very short, seems like something might be missing? At least mine is way longer than that. I've had the same issue if I mistype my config file and don't leave the token as one whole row ... just a thought. But it works, so it's a token thing, refresh token and make sure to enter it correctly for svtplay-dl to process ... is at least my best bet.

@spaam
Copy link
Owner

spaam commented Oct 7, 2024

i removed parts of it.

@mjoberg
Copy link
Author

mjoberg commented Oct 7, 2024

But the instruction retrieving the token no longer works.
document.cookie.split("; ").find((row) => row.startsWith("tv4-refresh-token="))?.split("=")[1];
returns undefined
and document.cookie no longer returns the string "tv4-refresh-token".

@mjoberg
Copy link
Author

mjoberg commented Oct 7, 2024

Scripts using my token worked the other day but not today.

@spaam
Copy link
Owner

spaam commented Oct 7, 2024

i guess somehow you got logged out or something. 🤔

@Botarom
Copy link

Botarom commented Oct 15, 2024

I will add to this thead. I manage to fetch episode 1 and 2, but not 3 or Four. I logged out and in and copied the new token into .svtplay.yaml. No change. I Manage to download episode 1 and 2 but not 3 or 4.
I tried this on Robinson. I might add that episode 3 and four is gränslandet

@SweDennis
Copy link

SweDennis commented Oct 17, 2024

Tried a bunch of them. Normal episodes seem to work, but anything gränslandet is DRM protected, so we're out of luck with those, and it's a separate issue from OP and tokens.

@cobolbear
Copy link

I have similar issues with this, looks like more and more of TV4 content is marked as "ERROR: No videos found. We can't download DRM protected content from this site."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants