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

Unable to use "cookies: st=XXXXX" for 'discoveryplus' service #1408

Open Fooughhy opened 3 years ago

Fooughhy commented 3 years ago

svtplay-dl versions:

Run svtplay-dl --version svtplay-dl 4.2

Operating system and Python version:

Name and version of the operating system and python version (run python --version) Windows 10 Pro Python 3.8.8

What is the issue:

"st" cookie for the 'discoveryplus' service doesn't work in the .yaml config file. If I rename the service to the old 'dplay' it recognizes the cookie that I'm using.

So, the following works:

service:
  dplay:
    cookies: st="XXXXXX"

But this doesn't:

service:
  discoveryplus:
    cookies: st="XXXXXX"
spaam commented 3 years ago

this is pretty strange, it works great here. when i copy your config for discoveryplus and added my st cookie thing it worked great. 🤔

Fooughhy commented 3 years ago

Sorry, I truly have no idea why but I tried it several times and it didn't work. But now it does.

So apologies.

I do have another problem though, but unsure if I should make a new issue. I do not have a subscription to discoveryplus, and am trying to download Alla Mot Alla. It detects that there are 4 "episodes" that are free (1 trailer, and 3 episodes) but it keeps crashing on me at different points.

DEBUG [1628689473.027324] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://dplaynordics-vod-13.akamaized.net:443 "GET /dplaydni/226041/0/hls/10298036004/exp=1628775882%E2%80%BEacl=%2F*%E2%80%BEdata=hdntl%E2%80%BEhmac=2cbd582cae2d88cbe0cf72f089fa8add30f018e29e795609fd040fbde7cd7991/498041833-prog_index.m3u8?version_hash=f4617d5c HTTP/1.1" 403 580
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 104, in run
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\cx_Freeze\initscripts\Console.py", line 15, in run
  File "bin/svtplay-dl", line 7, in <module>
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\__init__.py", line 69, in main
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 61, in get_media
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 93, in get_all_episodes
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 203, in get_one_media
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 214, in download
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 226, in _download
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 364, in __init__
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 378, in parse_m3u
ValueError: Does not appear to be an 'EXTM3U' file.

This happens on different episodes it seems.

I'm running the command: svtplay-dl -f --subfolder --merge-subtitle --nfo --thumbnail --all-episodes -v https://www.discoveryplus.se/program/alla-mot-alla-med-filip-och-fredrik

spaam commented 3 years ago

the classic tell the support about the issue and it automagically fixes it 😆

Are you trying to access the videos from sweden or somewhere else? At the end of the DEBUG line we can see a 403 http status code which means you cant access it. I need to implement a better message to handle that.

Fooughhy commented 3 years ago

Exactly 😄

No, I'm in Sweden. Though I use a PiHole as my DNS proxy. But the weird thing is that using essentially the same command, I've already downloaded all 4 episodes (though I interrupted it during the final download as for some reason it isn't putting it in a subfolder, but that's a whole other issue).

After that it's been having issues.

I should probably have included my whole output, though I didn't know if my "st" cookie was included:

svtplay-dl --subfolder --merge-subtitle --nfo --thumbnail --all-episodes -v https://www.discoveryplus.se/program/alla-mot-alla-med-filip-och-fredrik
DEBUG [1628695305.287471] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_media: version: 4.2
DEBUG [1628695305.2914605] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\service\__init__.py/__init__: service: discoveryplus
DEBUG [1628695305.292458] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/users/me'
DEBUG [1628695305.2934551] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): disco-api.discoveryplus.se:443
DEBUG [1628695305.5381672] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /users/me HTTP/1.1" 200 None
DEBUG [1628695305.539165] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/token?realm=dplayse&deviceId=33dc553c447488566b65c24b620773a09683acc7fd05538f23ccb38746e88292&shortlived=true'
DEBUG [1628695305.6179402] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /token?realm=dplayse&deviceId=33dc553c447488566b65c24b620773a09683acc7fd05538f23ccb38746e88292&shortlived=true HTTP/1.1" 200 None
DEBUG [1628695305.6179402] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/users/me'
DEBUG [1628695305.6768541] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /users/me HTTP/1.1" 200 None
DEBUG [1628695305.6774359] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'http://disco-api.discoveryplus.se/cms/routes/program/alla-mot-alla-med-filip-och-fredrik?decorators=viewingHistory&include=default'
DEBUG [1628695305.6804671] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTP connection (1): disco-api.discoveryplus.se:80
DEBUG [1628695305.7685156] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: http://disco-api.discoveryplus.se:80 "GET /cms/routes/program/alla-mot-alla-med-filip-och-fredrik?decorators=viewingHistory&include=default HTTP/1.1" 301 134
DEBUG [1628695305.8734384] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/routes/program/alla-mot-alla-med-filip-och-fredrik?decorators=viewingHistory&include=default HTTP/1.1" 200 None
DEBUG [1628695305.8784802] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=6'
DEBUG [1628695305.954517] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=6 HTTP/1.1" 200 None
DEBUG [1628695305.9624946] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=5'
DEBUG [1628695306.0426269] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.0476615] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=2&pf[seasonNumber]=5'
DEBUG [1628695306.1322398] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=2&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.1342366] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=3&pf[seasonNumber]=5'
DEBUG [1628695306.2138946] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=3&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.2149005] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=4&pf[seasonNumber]=5'
DEBUG [1628695306.2980404] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=4&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.2990386] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=5&pf[seasonNumber]=5'
DEBUG [1628695306.3778455] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=5&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.3808477] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=6&pf[seasonNumber]=5'
DEBUG [1628695306.461964] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=6&pf%5BseasonNumber%5D=5 HTTP/1.1" 200 None
DEBUG [1628695306.465011] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=4'
DEBUG [1628695306.5504525] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.5554903] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=2&pf[seasonNumber]=4'
DEBUG [1628695306.6405835] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=2&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.6415856] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=3&pf[seasonNumber]=4'
DEBUG [1628695306.7257245] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=3&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.730751] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=4&pf[seasonNumber]=4'
DEBUG [1628695306.81443] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=4&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.81543] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=5&pf[seasonNumber]=4'
DEBUG [1628695306.899328] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=5&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.9003255] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=6&pf[seasonNumber]=4'
DEBUG [1628695306.9777977] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=6&pf%5BseasonNumber%5D=4 HTTP/1.1" 200 None
DEBUG [1628695306.978835] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=3'
DEBUG [1628695307.0632992] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=3 HTTP/1.1" 200 None
DEBUG [1628695307.064296] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=2&pf[seasonNumber]=3'
DEBUG [1628695307.1468837] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=2&pf%5BseasonNumber%5D=3 HTTP/1.1" 200 None
DEBUG [1628695307.1515374] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=3&pf[seasonNumber]=3'
DEBUG [1628695307.2315707] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=3&pf%5BseasonNumber%5D=3 HTTP/1.1" 200 None
DEBUG [1628695307.2355852] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=4&pf[seasonNumber]=3'
DEBUG [1628695307.3201509] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=4&pf%5BseasonNumber%5D=3 HTTP/1.1" 200 None
DEBUG [1628695307.321146] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=5&pf[seasonNumber]=3'
DEBUG [1628695307.401093] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=5&pf%5BseasonNumber%5D=3 HTTP/1.1" 200 None
DEBUG [1628695307.4020922] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=2'
DEBUG [1628695307.4824567] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=2 HTTP/1.1" 200 None
DEBUG [1628695307.483456] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=2&pf[seasonNumber]=2'
DEBUG [1628695307.5686717] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=2&pf%5BseasonNumber%5D=2 HTTP/1.1" 200 None
DEBUG [1628695307.572712] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=3&pf[seasonNumber]=2'
DEBUG [1628695307.65647] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=3&pf%5BseasonNumber%5D=2 HTTP/1.1" 200 None
DEBUG [1628695307.6604555] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=4&pf[seasonNumber]=2'
DEBUG [1628695307.746073] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=4&pf%5BseasonNumber%5D=2 HTTP/1.1" 200 None
DEBUG [1628695307.7480736] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=5&pf[seasonNumber]=2'
DEBUG [1628695307.832152] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=5&pf%5BseasonNumber%5D=2 HTTP/1.1" 200 None
DEBUG [1628695307.8331451] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=1&pf[seasonNumber]=1'
DEBUG [1628695307.9181488] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=1&pf%5BseasonNumber%5D=1 HTTP/1.1" 200 None
DEBUG [1628695307.9191463] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page[items.number]=2&pf[seasonNumber]=1'
DEBUG [1628695308.0011618] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /cms/collections/250113178068544661220696579997795310376?decorators=viewingHistory&include=default&page%5Bitems.number%5D=2&pf%5BseasonNumber%5D=1 HTTP/1.1" 200 None
DEBUG [1628695308.002159] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\service\__init__.py/__init__: service: discoveryplusINFO [1628695308.0031593] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_all_episodes: Episode 1 of 4
INFO [1628695308.0031593] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_all_episodes: Url: https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6
DEBUG [1628695308.0031593] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6'
DEBUG [1628695308.0041597] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): www.discoveryplus.se:443
DEBUG [1628695308.10212] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://www.discoveryplus.se:443 "GET /videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6 HTTP/1.1" 200 None
DEBUG [1628695308.1230683] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/token?realm=dplayse&deviceId=374708fff7719dd5979ec875d56cd2286f6d3cf7ec317a3b25632aab28ec37bb&shortlived=true'
DEBUG [1628695308.1250947] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): disco-api.discoveryplus.se:443
DEBUG [1628695308.327328] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /token?realm=dplayse&deviceId=374708fff7719dd5979ec875d56cd2286f6d3cf7ec317a3b25632aab28ec37bb&shortlived=true HTTP/1.1" 200 None
DEBUG [1628695308.327328] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/users/me'
DEBUG [1628695308.3869667] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /users/me HTTP/1.1" 200 None
DEBUG [1628695308.3890057] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/content/videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6'
DEBUG [1628695308.4585667] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /content/videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6 HTTP/1.1" 200 None
DEBUG [1628695308.460552] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://disco-api.discoveryplus.se/playback/videoPlaybackInfo/276675?usePreAuth=true'
DEBUG [1628695308.5375338] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://disco-api.discoveryplus.se:443 "GET /playback/videoPlaybackInfo/276675?usePreAuth=true HTTP/1.1" 200 None
DEBUG [1628695308.5390697] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://dplaynordics-vod-13.akamaized.net/dplaydni/226041/0/hls/10298036004/playlist.m3u8?hdnts=st=1628695318~exp=1628781718~acl=/dplaydni/226041/0/hls/10298036004/*~hmac=23943fbd32694309c1445e844579d02f2f0d6de584fc334a24f07e4cb2d0cf45'
DEBUG [1628695308.5430863] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): dplaynordics-vod-13.akamaized.net:443
DEBUG [1628695308.685134] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://dplaynordics-vod-13.akamaized.net:443 "GET /dplaydni/226041/0/hls/10298036004/playlist.m3u8?hdnts=st=1628695318~exp=1628781718~acl=/dplaydni/226041/0/hls/10298036004/*~hmac=23943fbd32694309c1445e844579d02f2f0d6de584fc334a24f07e4cb2d0cf45 HTTP/1.1" 200 None
DEBUG [1628695308.9576983] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\stream.py/format_prio: Format priority: ['h264', 'h264-51']
DEBUG [1628695308.9586966] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\stream.py/protocol_prio: Protocol priority scores (higher is better): {'dash': 3, 'hls': 2, 'http': 1}
DEBUG [1628695308.958813] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://dplaynordics-vod-13.akamaized.net/dplaydni/226041/0/hls/10298036004/exp=1628781718‾acl=%2f*‾data=hdntl‾hmac=319028b8f8e920c71148e6114fdb6c161454e332d328572c326a4a392bc95d24/1024744653-prog_index.m3u8?version_hash=f4617d5c'
DEBUG [1628695308.959843] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): dplaynordics-vod-13.akamaized.net:443
DEBUG [1628695309.0306997] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://dplaynordics-vod-13.akamaized.net:443 "GET /dplaydni/226041/0/hls/10298036004/exp=1628781718%E2%80%BEacl=%2F*%E2%80%BEdata=hdntl%E2%80%BEhmac=319028b8f8e920c71148e6114fdb6c161454e332d328572c326a4a392bc95d24/1024744653-prog_index.m3u8?version_hash=f4617d5c HTTP/1.1" 403 581
INFO [1628695309.0347183] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\output.py/find_dupes: Outfile: alla-mot-alla-med-filip-och-fredrik.s06e601.trailer.alla.mot.alla.med.filip.och.fredrik.sasong.6-276675-discoveryplus.ts
INFO [1628695309.0356925] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py/get_one_media: Selected to download hls, bitrate: 6718 format: h264
DEBUG [1628695309.0366907] D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\http.py/request: HTTP getting 'https://dplaynordics-vod-13.akamaized.net/dplaydni/226041/0/hls/10298036004/exp=1628781718‾acl=%2f*‾data=hdntl‾hmac=319028b8f8e920c71148e6114fdb6c161454e332d328572c326a4a392bc95d24/498041833-prog_index.m3u8?version_hash=f4617d5c'
DEBUG [1628695309.0397048] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_new_conn: Starting new HTTPS connection (1): dplaynordics-vod-13.akamaized.net:443
DEBUG [1628695309.1129045] C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\urllib3\connectionpool.py/_make_request: https://dplaynordics-vod-13.akamaized.net:443 "GET /dplaydni/226041/0/hls/10298036004/exp=1628781718%E2%80%BEacl=%2F*%E2%80%BEdata=hdntl%E2%80%BEhmac=319028b8f8e920c71148e6114fdb6c161454e332d328572c326a4a392bc95d24/498041833-prog_index.m3u8?version_hash=f4617d5c HTTP/1.1" 403 580
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 104, in run
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\cx_Freeze\initscripts\Console.py", line 15, in run
  File "bin/svtplay-dl", line 7, in <module>
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\__init__.py", line 69, in main
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 61, in get_media
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 93, in get_all_episodes
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 203, in get_one_media
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 214, in download
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 226, in _download
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 364, in __init__
  File "D:\a\svtplay-dl\svtplay-dl\lib\svtplay_dl\fetcher\hls.py", line 378, in parse_m3u
ValueError: Does not appear to be an 'EXTM3U' file.

From what I can see, it's trying to download the trailer for season 6, which definitely shouldn't be blocked in any way. As I said before, it seems to be having difficulties accessing different episodes every time. Though I suppose I should simply try to download them individually.

(Also, before I ran it this time, I removed the old files and left out the '--force' toggle)

tubalainen commented 3 years ago

Just to help others, please note where the quotes are in the config from the org.post above is placed after the = - that does not work (for me).

This is a working .svtplay-dl.yaml file with the following config for DiscoveryPlus.

service:
  discoveryplus:
    cookies: "st=XxxXxxXXX"
Fooughhy commented 3 years ago

Yes, I suppose you shouldn't mimic my example as I still haven't gotten it to work (or at least not reliably).

I just ran the following command: svtplay-dl --subfolder --merge-subtitle --nfo --thumbnail --all-episodes -v "https://www.discoveryplus.se/program/alla-mot-alla-med-filip-och-fredrik"

This actually worked completely, downloading the trailer and the 3 free episodes without error. This is also with the config you mentioned, with the config like cookies: "st=XxxXxxXXX".

If I remove the -v toggle, it doesn't work anymore. Which of course shouldn't have anything to do with the cookies.

svtplay-dl --subfolder --merge-subtitle --nfo --thumbnail --all-episodes "https://www.discoveryplus.se/program/alla-mot-alla-med-filip-och-fredrik"
INFO: Episode 1 of 4
INFO: Url: https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/trailer-alla-mot-alla-med-filip-och-fredrik-sasong-6
INFO: Outfile: alla-mot-alla-med-filip-och-fredrik.s06e601.trailer.alla.mot.alla.med.filip.och.fredrik.sasong.6-276675-discoveryplus.ts
INFO: Selected to download hls, bitrate: 6718 format: h264
[3/3][================================================================================] ETA: 0:00:00
[3/3][================================================================================] ETA: 0:00:00
INFO: Merge audio and video into alla-mot-alla-med-filip-och-fredrik.s06e601.trailer.alla.mot.alla.med.filip.och.fredrik.sasong.6-276675-discoveryplus.mp4
INFO: Merging done, removing old files.
INFO: Episode 2 of 4
INFO: Url: https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/hur-ofta-tanker-melander-pa-kalkongamen
ERROR: svtplay-dl crashed
ERROR: Run again and add --verbose as an argument, to get more information
ERROR: If the error persists, you can report it at https://github.com/spaam/svtplay-dl/issues
ERROR: Include the URL used, the stack trace and the output of svtplay-dl --version in the issue
INFO: Episode 3 of 4
INFO: Url: https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/har-janne-josefsson-haft-gruppsex
INFO: Outfile: alla-mot-alla-med-filip-och-fredrik.s02e01.har.janne.josefsson.haft.gruppsex-97949-discoveryplus.srt
INFO: Outfile: alla-mot-alla-med-filip-och-fredrik.s02e01.har.janne.josefsson.haft.gruppsex-97949-discoveryplus.ts
INFO: Selected to download hls, bitrate: 6541 format: h264
[262/262][================================================================================] ETA: 0:00:00
[262/262][================================================================================] ETA: 0:00:00
INFO: Merge audio, video and subtitle into alla-mot-alla-med-filip-och-fredrik.s02e01.har.janne.josefsson.haft.gruppsex-97949-discoveryplus.mp4
INFO: Determining the language of the subtitle(s).
INFO: Language code: swe
INFO: Merging done, removing old files.
INFO: Episode 4 of 4
INFO: Url: https://www.discoveryplus.se/videos/alla-mot-alla-med-filip-och-fredrik/alla-mot-alla-med-filip-och-fredrik-101
INFO: Outfile: alla-mot-alla-med-filip-och-fredrik.s01e01.piken.mot.filip.ditt.liv.ar.bara.massa.gratispoang-77143-discoveryplus.srt
INFO: Outfile: alla-mot-alla-med-filip-och-fredrik.s01e01.piken.mot.filip.ditt.liv.ar.bara.massa.gratispoang-77143-discoveryplus.ts
INFO: Selected to download hls, bitrate: 6537 format: h264
[261/261][================================================================================] ETA: 0:00:00
[261/261][================================================================================] ETA: 0:00:00
INFO: Merge audio, video and subtitle into alla-mot-alla-med-filip-och-fredrik.s01e01.piken.mot.filip.ditt.liv.ar.bara.massa.gratispoang-77143-discoveryplus.mp4
INFO: Determining the language of the subtitle(s).
INFO: Language code: swe
INFO: Merging done, removing old files.

Between these runs I removed the downloaded files, so it was a clean slate.