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

TV4Play crashes #914

Closed KGBGit closed 6 years ago

KGBGit commented 6 years ago

KGBMacPro:~ ketil$ svtplay-dl --version 1.9.11 KGBMacPro:~ ketil$ svtplay-dl https://www.tv4play.se/program/morden-i-sandhamn/3960662 Traceback (most recent call last): File "/usr/local/bin/svtplay-dl", line 7, in svtplay_dl.main() File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/init.py", line 511, in main get_media(urls[0], options) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/init.py", line 217, in get_media get_one_media(stream, copy.copy(options)) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/init.py", line 249, in get_one_media if not filename(stream): File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/output.py", line 127, in filename data = ensure_unicode(stream.get_urldata()) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/service/init.py", line 32, in get_urldata self._urldata = self.http.request("get", self.url).text File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/svtplay_dl/utils/init.py", line 68, in request res = Session.request(self, method, url, verify=self.verify, proxies=self.proxy, *args, kwargs) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/Cellar/svtplay-dl/1.9.11/libexec/lib/python2.7/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='www.tv4play.se', port=443): Max retries exceeded with url: /program/morden-i-sandhamn/3960662 (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))

Sopor commented 6 years ago

It seems to crash in master too

Sopor commented 6 years ago
$ svtplay-dl --verbose https://www.tv4play.se/program/morden-i-sandhamn/3960662
version: 1.9.11
DEBUG [1528118728.7095716] /usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/getmedia.py/get_media: version: 1.9.11
DEBUG [1528118728.717538] /usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/service/__init__.py/__init__: service: tv4play
DEBUG [1528118728.7180371] /usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/http.py/request: HTTP getting 'https://www.tv4play.se/program/morden-i-sandhamn/3960662'
DEBUG [1528118728.7279341] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): www.tv4play.se
DEBUG [1528118728.8642948] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: https://www.tv4play.se:443 "GET /program/morden-i-sandhamn/3960662 HTTP/1.1" 200 8280
DEBUG [1528118728.8726377] /usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/http.py/request: HTTP getting 'http://prima.tv4play.se/api/web/asset/3960662/play'
DEBUG [1528118728.8791606] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTP connection (1): prima.tv4play.se
DEBUG [1528118728.9942489] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
DEBUG [1528118728.995902] /usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py/increment: Incremented Retry for (url='/api/web/asset/3960662/play'): Retry(total=4, connect=5, read=5, redirect=None, status=None)
DEBUG [1528118728.997154] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/urlopen: Retry: /api/web/asset/3960662/play
DEBUG [1528118729.0859919] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
DEBUG [1528118729.0875225] /usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py/increment: Incremented Retry for (url='/api/web/asset/3960662/play'): Retry(total=3, connect=5, read=5, redirect=None, status=None)
DEBUG [1528118729.689307] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/urlopen: Retry: /api/web/asset/3960662/play
DEBUG [1528118729.7825048] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
DEBUG [1528118729.7835917] /usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py/increment: Incremented Retry for (url='/api/web/asset/3960662/play'): Retry(total=2, connect=5, read=5, redirect=None, status=None)
DEBUG [1528118730.9856787] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/urlopen: Retry: /api/web/asset/3960662/play
DEBUG [1528118731.0755668] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
DEBUG [1528118731.0766363] /usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py/increment: Incremented Retry for (url='/api/web/asset/3960662/play'): Retry(total=1, connect=5, read=5, redirect=None, status=None)
DEBUG [1528118733.479985] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/urlopen: Retry: /api/web/asset/3960662/play
DEBUG [1528118733.5693796] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
DEBUG [1528118733.5704505] /usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py/increment: Incremented Retry for (url='/api/web/asset/3960662/play'): Retry(total=0, connect=5, read=5, redirect=None, status=None)
DEBUG [1528118738.3758] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/urlopen: Retry: /api/web/asset/3960662/play
DEBUG [1528118738.4669728] /usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py/_make_request: http://prima.tv4play.se:80 "GET /api/web/asset/3960662/play HTTP/1.1" 502 995
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 732, in urlopen
    body_pos=body_pos, **response_kw)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 732, in urlopen
    body_pos=body_pos, **response_kw)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 732, in urlopen
    body_pos=body_pos, **response_kw)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 732, in urlopen
    body_pos=body_pos, **response_kw)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 732, in urlopen
    body_pos=body_pos, **response_kw)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 712, in urlopen
    retries = retries.increment(method, url, response=response, _pool=self)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='prima.tv4play.se', port=80): Max retries exceeded with url: /api/web/asset/3960662/play (Caused by ResponseError('too many 502 error responses',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/svtplay-dl", line 4, in <module>
    __import__('pkg_resources').run_script('svtplay-dl==1.9.11', 'svtplay-dl')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/EGG-INFO/scripts/svtplay-dl", line 7, in <module>
    svtplay_dl.main()
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/__init__.py", line 60, in main
    get_media(urls[0], config, __version__)
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/getmedia.py", line 54, in get_media
    get_one_media(stream)
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/getmedia.py", line 104, in get_one_media
    for i in streams:
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/service/tv4play.py", line 47, in get
    data = self.http.request("get", url, cookies=self.cookies)
  File "/usr/local/lib/python3.5/dist-packages/svtplay_dl-1.9.11-py3.5.egg/svtplay_dl/utils/http.py", line 43, in request
    res = Session.request(self, method, url, verify=self.verify, proxies=self.proxy, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 499, in send
    raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPConnectionPool(host='prima.tv4play.se', port=80): Max retries exceeded with url: /api/web/asset/3960662/play (Caused by ResponseError('too many 502 error responses',))
KGBGit commented 6 years ago

Is there something I done wrong or...?

Sopor commented 6 years ago

They seem to have changed their API, so it is only to wait. Other similar apps won't work either.

KGBGit commented 6 years ago

I don't understand, wait for what?

Sopor commented 6 years ago

@KGBGit wait for them to fix the issue...

spaam commented 6 years ago

im working on it but things takes time and other stuff need to get fixed too. :)

KGBGit commented 6 years ago

Ok, I didn't know, sorry.

myowncloudservice commented 6 years ago

I found this information on this link: https://github.com/rg3/youtube-dl/issues/16650 (Info by user: jonsag)

Video link: https://www.tv4play.se/program/full-frys/3966267

API: https://playback-api.b17g.net/asset/3966267?service=tv4&device=browser&protocol=dash https://playback-api.b17g.net/asset/3966267?service=tv4&device=browser&protocol=hls https://playback-api.b17g.net/asset/3966267?service=tv4&device=browser&protocol=hds https://playback-api.b17g.net/asset/3966267?service=tv4&device=browser&protocol=http https://playback-api.b17g.net/asset/3966267?service=tv4&device=browser&protocol=rtmp

I don´t now if it´s correct...

Sopor commented 6 years ago

I would like to get the subtitles. Any work-around until it is fixed? It looks like youtube-dl have disabled the subtitle download :(

myowncloudservice commented 6 years ago

I found another api today, maybe for the subtitles?

https://playback-api.b17g.net/media/3966267?service=tv4&device=browser&protocol=hls

Download .m3u8 for the link above... https://lbs-usp-hls-vod.cmore.se/vod/3d6d8/rxlon5otmdm(3966267_ISMUSP).ism/rxlon5otmdm(3966267_ISMUSP).m3u8

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

# AUDIO groups
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-aacl-93",NAME="English",LANGUAGE="en",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2"

# SUBTITLES groups
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="textstream",NAME="Swedish",LANGUAGE="sv",AUTOSELECT=YES,DEFAULT=YES,URI="rxlon5otmdm(3966267_ISMUSP)-textstream_swe=1000.m3u8"

# variants
#EXT-X-STREAM-INF:BANDWIDTH=207000,CODECS="mp4a.40.2,avc1.42001E",RESOLUTION=96x72,FRAME-RATE=25,AUDIO="audio-aacl-93",SUBTITLES="textstream",CLOSED-CAPTIONS=NONE
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468-video_eng=100000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=369000,CODECS="mp4a.40.2,avc1.42001E",RESOLUTION=384x288,FRAME-RATE=25,AUDIO="audio-aacl-93",SUBTITLES="textstream",CLOSED-CAPTIONS=NONE
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468-video_eng=253000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=850000,CODECS="mp4a.40.2,avc1.42001E",RESOLUTION=512x384,FRAME-RATE=25,AUDIO="audio-aacl-93",SUBTITLES="textstream",CLOSED-CAPTIONS=NONE
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468-video_eng=707000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1590000,CODECS="mp4a.40.2,avc1.4D001E",RESOLUTION=640x480,FRAME-RATE=25,AUDIO="audio-aacl-93",SUBTITLES="textstream",CLOSED-CAPTIONS=NONE
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468-video_eng=1405000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2581000,CODECS="mp4a.40.2,avc1.4D001F",RESOLUTION=768x576,FRAME-RATE=25,AUDIO="audio-aacl-93",SUBTITLES="textstream",CLOSED-CAPTIONS=NONE
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468-video_eng=2340000.m3u8

# variants
#EXT-X-STREAM-INF:BANDWIDTH=101000,CODECS="mp4a.40.2",AUDIO="audio-aacl-93",SUBTITLES="textstream"
rxlon5otmdm(3966267_ISMUSP)-audio_eng=93468.m3u8

# keyframes
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=14000,CODECS="avc1.42001E",RESOLUTION=96x72,URI="keyframes/rxlon5otmdm(3966267_ISMUSP)-video_eng=100000.m3u8"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=34000,CODECS="avc1.42001E",RESOLUTION=384x288,URI="keyframes/rxlon5otmdm(3966267_ISMUSP)-video_eng=253000.m3u8"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=94000,CODECS="avc1.42001E",RESOLUTION=512x384,URI="keyframes/rxlon5otmdm(3966267_ISMUSP)-video_eng=707000.m3u8"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=187000,CODECS="avc1.4D001E",RESOLUTION=640x480,URI="keyframes/rxlon5otmdm(3966267_ISMUSP)-video_eng=1405000.m3u8"
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=311000,CODECS="avc1.4D001F",RESOLUTION=768x576,URI="keyframes/rxlon5otmdm(3966267_ISMUSP)-video_eng=2340000.m3u8"
Sopor commented 6 years ago

Only for your information, you need a newer ffmpeg too to get this issue fixed.

KGBGit commented 6 years ago

I have ffmpeg 4.0 installed. It still don't work.

spaam commented 6 years ago

master have a fix for this. hopefully i will release 2.0 tomorrow or friday.

KGBGit commented 6 years ago

Hello, what program will be 2.0, svtplay-dl??

Mvh Ketil

5 juli 2018 v.27 kl. 01:34 skrev Johan Andersson notifications@github.com:

master have a fix for this. hopefully i will release 2.0 tomorrow or friday.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spaam/svtplay-dl/issues/914#issuecomment-402571954, or mute the thread https://github.com/notifications/unsubscribe-auth/AfCVxUbrY80E5srTO6CLGQHZZasEbfdrks5uDVEAgaJpZM4UY_EI.

Jacalz commented 6 years ago

Yes @KGBGit, svtplay-dl seems to be getting a 2.0 update in the not too distant future 😉

KGBGit commented 6 years ago

Exiting, will be great.

Mvh Ketil

11 juli 2018 v.28 kl. 18:11 skrev Jacob notifications@github.com:

Yes @KGBGit https://github.com/KGBGit, svtplay-dl seems to be getting a 2.0 update in the not too distant future 😉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spaam/svtplay-dl/issues/914#issuecomment-404226376, or mute the thread https://github.com/notifications/unsubscribe-auth/AfCVxYFKn6xuFjtEJ0ZHolXZB5tQRFY6ks5uFiO6gaJpZM4UY_EI.