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

Unable to login to 1und1.tv (Zattoo partner site) #18035

Closed
EugenVau opened this issue Oct 31, 2018 · 3 comments
Closed

Unable to login to 1und1.tv (Zattoo partner site) #18035

EugenVau opened this issue Oct 31, 2018 · 3 comments

Comments

@EugenVau
Copy link

@EugenVau EugenVau commented Oct 31, 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.10.29. 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.10.29

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:

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 ```):

C:\Users\xyz\Videos>youtube-dl.exe --cookies %HOME%cookies.txt --verbose https://www.1und1.tv/watch/zdf/148943697-markus-lanz
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', '%HOME%cookies.txt', '--verbose', 'https://www.1und1.tv/watch/zdf/148943697-markus-lanz']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.10.29
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 2.8.4
[debug] Proxy map: {}
[EinsUndEinsTV] Downloading app token
[EinsUndEinsTV] Opening session
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); 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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpadzwnijc\build\youtube_dl\extractor\common.py", line 605, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpadzwnijc\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 502, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 685, in http_error_302
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

I cannot download from 1und1.tv (a Zattoo partner site) because the session cannot be opened. The output says "Unable to download webpage: HTTP Error 404", see log file. I investigated a bit. youtube-dl uses the Zattoo extractor for this site: class EinsUndEinsTVIE. At line 65 a request to [HOST]/zapi/v2/session/hello is made to initiate a session:

        self._request_webpage(
            '%s/zapi/v2/session/hello' % self._host_url(), None,
            'Opening session', data=urlencode_postdata({
                'client_app_token': app_token,
                'uuid': compat_str(uuid4()),
                'lang': 'en',
                'app_version': app_version,
                'format': 'json',
            }))

This URL path is not correct for 1und1.tv - the /hello part is not needed, see attached screenshot from Chrome dev tools:

image

In my opinion, this could be fixed by removing the /hello part from line 65 of the zattoo extractor like this:


        self._request_webpage(
            '%s/zapi/v2/session' % self._host_url(), None,
            'Opening session', data=urlencode_postdata({
                'client_app_token': app_token,
                'uuid': compat_str(uuid4()),
                'lang': 'en',
                'app_version': app_version,
                'format': 'json',
            }))

The question is, how would other partner sites supported by the Zattoo extractor be affected by this change, if at all. Or can this be done only for EinsUndEinsTV in any way?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 31, 2018

Of course you are not allowed to make any changes that will alter the behavior of existing code. What you must do is to implement some basic polymorphism for session part of URL.

@EugenVau
Copy link
Author

@EugenVau EugenVau commented Nov 5, 2018

Hi @dstftw,

thanks for the quick reply.

It's perfectly clear to me that it's not an option for the general code. I just wondered if I could do it only for myself and build youtube-dl with that change just for myself, as I only use EinsUndEinsTV from the Zattoo extractor.

In the meantime I fiddled around a bit with Fiddler (what a pun :-D ) and found out that changing the hostname from 1und1.tv to www.1und.tv in the EinsUndEinsTVIE part of the zattoo extractor is enough to get things working.

This would be the minimal possible change in the code to fix the problem. Could someone do that please? In the current state, the EinsUndEinsTV part isn't functional anyway.

Besides, great work!!!

@dstftw dstftw closed this in 16d896b Nov 5, 2018
@EugenVau
Copy link
Author

@EugenVau EugenVau commented Nov 5, 2018

Wow! That was fast! 👍
When is the next release expected? I'm not urging, just asking... Or are there nightly builds somewhere? 😄

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
2 participants
You can’t perform that action at this time.