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

[twitch:vod] Login issue while downloading VOD which requires channel subscription #17024

Closed
5 of 9 tasks
alyssarowan opened this issue Jul 20, 2018 · 10 comments
Closed
5 of 9 tasks

Comments

@alyssarowan
Copy link

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.07.10. 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.07.10

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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.twitch.tv/videos/286907505', u'-u', u'PRIVATE']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.10
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-24-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2
[debug] Proxy map: {}
[twitch:vod] Downloading login page
[twitch:vod] Logging in
ERROR: Unable to download JSON metadata: 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 "/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/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Description of your issue, suggested solution and other information

Very recently (this week) yt-dl is unable to log in to Twitch.tv to download any VOD for local playback which requires a channel subscription - looks like the account login flow has broken? It worked last week - same account/password - and it still works in the browser.

@flugasak
Copy link

I had the same problem with the episode last week, except since I renewed my cookies I get a 403 instead of a 404.

$ youtube-dl --cookies cookies-2018-07-23.txt https://www.twitch.tv/videos/286899668 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'cookies-2018-07-23.txt', 'https://www.twitch.tv/videos/286899668', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.21
[debug] Python version 3.5.2 (CPython) - Linux-4.4.0-130-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[twitch:vod] 286899668: Downloading vod info JSON
[twitch:vod] 286899668: Downloading vod access token
[twitch:vod] 286899668: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 403: ERROR (caused by <HTTPError 403: 'ERROR'>); 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 "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 599, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

This is very much still an issue with the lastest version of youtube_dl (2018.7.21)

@timbroder
Copy link

timbroder commented Jul 25, 2018

Same issue with different output from me.

youtube-dl -x --audio-format mp3 -u [redacted] -p [redacted] --verbose --cookies ~/Downloads/cookies.txt https://www.twitch.tv/videos/288895895
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-x', u'--audio-format', u'mp3', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--verbose', u'--cookies', u'/Users/timbroder/Downloads/cookies.txt', u'https://www.twitch.tv/videos/288895895']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.21
[debug] Python version 2.7.15 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0, ffprobe 4.0
[debug] Proxy map: {}
[twitch:vod] Downloading login page
[twitch:vod] Logging in
ERROR: Unable to download JSON metadata: 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 "/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 435, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  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/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@timbroder
Copy link

I'm not sure if this is new or not. But Twitch's login is using passport.twitch.tv/login instead of twitch.tv/login

The login form makes this request:

curl 'https://passport.twitch.tv/login' -H 'Pragma: no-cache' -H 'Origin: https://www.twitch.tv' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'Content-Type: text/plain;charset=UTF-8' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'Referer: https://www.twitch.tv/login' -H 'Connection: keep-alive' --data-binary '{"username":"timbroder","password":"redacted","client_id":"redacted"}' --compressed

Which returns: {"redirect_path":"https://www.twitch.tv/","access_token":"redacted"}

I've been tinkering with TwitchBaseIE to see if I can get it to authenticate against that service instead, but keep getting {"error_code":1002,"error_description":"failed to decode JSON"} back from passport

Will try again over the weekend.

Does anyone know if passport is new and could be the issue or am I chasing a red herring?

@Hrxn
Copy link

Hrxn commented Jul 31, 2018

Does anyone know if passport is new and could be the issue or am I chasing a red herring?

Can't tell the exact date, but it's relatively new, yes.
I think you're probably on the right track here.

@timbroder
Copy link

To add some fun, there's captcha on the new endpoint

{"error_code":1000,"error_description":"captcha incorrect"}

@timbroder
Copy link

If anyone is available to test this, much appreciated

@dstftw dstftw closed this as completed in 48afc6c Aug 3, 2018
@timbroder
Copy link

@dstftw thank you for merging!

@timbroder
Copy link

@dstftw or @alyssarowan could you re-open this issue, please? It's happening again. I'll try to look at it over the weekend

@ryancole
Copy link

@timbroder What was the solution to the "failed to decode json" error? I'm messing around with this myself and am getting this error. I'm sure I'm providing proper JSON.

@timbroder
Copy link

@ryancole IIRC I had to change how it was passed here

What are you playing with? When I said I had an issue it turned out to be that my subscription to the channel had lapsed

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

Successfully merging a pull request may close this issue.

5 participants