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

Zattoo: Recording of replay (within 7 days) doesn't work, live stream recording works fine. Pls advise.. #17175

Closed
ckishappy opened this issue Aug 6, 2018 · 7 comments

Comments

@ckishappy
Copy link

@ckishappy ckishappy commented Aug 6, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.08.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.08.04

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

For the recording for a Zattoo Replay session (see below an example), the zattoo extractor doesn't work somehow and the replay session doesn't get recorded. The live stream recording for Zattoo works well as ever. Please advise..

youtube-dl https://zattoo.com/watch/srf1/143687052-rosamunde-pilcher-klippen-der-liebe --netrc --verbose

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://zattoo.com/watch/srf1/143687052-rosamunde-pilcher-klippen-der-liebe', u'--netrc', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
[debug] Proxy map: {}

youtube-dl https://zattoo.com/watch/srf1/143687052-rosamunde-pilcher-klippen-der-liebe --netrc --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://zattoo.com/watch/srf1/143687052-rosamunde-pilcher-klippen-der-liebe', u'--netrc', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
[debug] Proxy map: {}
[Zattoo] Downloading app token
[Zattoo] Opening session
[Zattoo] Logging in
[Zattoo] 143687052: Downloading video information
ERROR: Unable to download JSON metadata: '' (caused by BadStatusLine("''",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 599, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1102, in https_open
req, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open
r = h.getresponse(buffering=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1132, in getresponse
response.begin()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 417, in _read_status
raise BadStatusLine(line)

@ckishappy
Copy link
Author

@ckishappy ckishappy commented Aug 6, 2018

dstftw, I found your email is it ok for me to send you my login?

@marco79cgn
Copy link

@marco79cgn marco79cgn commented Sep 4, 2018

I can confirm that only live streams work.

Permanent recordings (available in Switzerland) can't be downloaded as well.

@goggle
Copy link
Contributor

@goggle goggle commented Sep 10, 2018

@marco79cgn Could you provide a debug log? I'm using a Zattoo partner and everything seems to work fine here...

@goggle
Copy link
Contributor

@goggle goggle commented Sep 10, 2018

Ok, I could do a recording an my free Zattoo account and I tried to access it with youtube-dl. I get an error too. Here is my debug log:

python -m youtube_dl "https://zattoo.com/watch/srf1/146042939-guetnachtgschichtli/129000419/1536593400000/1536594000000/0" -v
[debug] System config: []
[debug] User config: ['--netrc', '--retries', '30', '--mark-watched']
[debug] Custom config: []
[debug] Command-line args: ['https://zattoo.com/watch/srf1/146042939-guetnachtgschichtli/129000419/1536593400000/1536594000000/0', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.10
[debug] Git HEAD: 8476b4fd9
[debug] Python version 3.7.0 (CPython) - Linux-4.18.6-arch1-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg n4.0.2, ffprobe n4.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[Zattoo] Downloading app token
[Zattoo] Opening session
[Zattoo] Logging in
[Zattoo] 146042939: Downloading video information
ERROR: Unable to download JSON metadata: Remote end closed connection without response (caused by RemoteDisconnected('Remote end closed connection without response')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/home/alex/Projects/github.com/goggle/youtube-dl/youtube_dl/extractor/common.py", line 599, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/alex/Projects/github.com/goggle/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/home/alex/Projects/github.com/goggle/youtube-dl/youtube_dl/utils.py", line 1139, in https_open
    req, **kwargs)
  File "/usr/lib/python3.7/urllib/request.py", line 1320, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 296, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 265, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"

I will try to investigate the cause of the error.

@marco79cgn
Copy link

@marco79cgn marco79cgn commented Sep 11, 2018

//Update:
This is the debug log when trying to download a permanent recording of Zattoo Premium (Switzerland). Obviously a JSON parse error.

youtube-dl --verbose --username *** --password *** "https://zattoo.com/watch/daserste/145121157-monsieur-claude-und-seine-toechter/126131709/1534184100000/1534189500000/0"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--username', u'PRIVATE', u'--password', u'PRIVATE', u'https://zattoo.com/watch/daserste/145121157-monsieur-claude-und-seine-toechter/126131709/1534184100000/1534189500000/0']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.10
[debug] Python version 2.7.15 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[Zattoo] Downloading app token
[Zattoo] Opening session
[Zattoo] Logging in
[Zattoo] 145121157: Downloading video information
ERROR: Unable to download JSON metadata: '' (caused by BadStatusLine("''",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 599, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1139, in https_open
    req, **kwargs)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1201, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1121, in getresponse
    response.begin()
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 438, in begin
    version, status, reason = self._read_status()
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 402, in _read_status
    raise BadStatusLine(line)```
@goggle
Copy link
Contributor

@goggle goggle commented Sep 11, 2018

I have just submitted a PR to address the issue. Since I only have a free Zattoo acccount (not premium), I could only test it for recordings and not for the replay stuff.

It would be nice if someone could test it for regular videos too, you can just clone the zattoo-fix branch in my repo: https://github.com/goggle/youtube-dl/tree/zattoo-fix

@marco79cgn
Copy link

@marco79cgn marco79cgn commented Sep 12, 2018

Awesome, thanks for the quick fix! I can confirm that with the version of your branch now everything works just fine: live streams, permanent recordings (Zattoo CH Premium) as well as replay streams.

@dstftw dstftw closed this in 21160a1 Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.