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

Regression in 2017.03.05: downloading Twitch VODs that require login #12369

Closed
stephenwade opened this issue Mar 5, 2017 · 1 comment
Closed

Regression in 2017.03.05: downloading Twitch VODs that require login #12369

stephenwade opened this issue Mar 5, 2017 · 1 comment

Comments

@stephenwade
Copy link

@stephenwade stephenwade commented Mar 5, 2017

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

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

Description of your issue, suggested solution and other information

In version 2017.03.05, I can no longer download Twitch videos that are only available to subscribers. When I try, the program crashes after [twitch:vod] Logging in as (username):

  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 535, in sanitize_url
AttributeError: 'NoneType' object has no attribute 'startswith'

This is a regression, not a change in Twitch's download page. I downloaded 2017.03.02 and verified that I can still download the same video with that version. Both verbose outputs are provided below.

I have an account that is subscribed to the channel required to view the VOD I am testing with. I'm happy to give my credentials to someone over email, just not to post them publicly on Github. Email me at stephen@stephenwade.me.


Verbose output (current version, failure)

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

stephen@stephen-retina:~$ youtube-dl -v --username (username) -f Source https://www.twitch.tv/videos/125983527
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--username', u'PRIVATE', u'-f', u'Source', u'https://www.twitch.tv/videos/125983527']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.03.05
[debug] Python version 2.7.13 - Darwin-16.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[twitch:vod] Downloading login page
[twitch:vod] Logging in as (username)
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 457, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 447, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1883, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 761, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 426, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 384, in initialize
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 56, in _real_initialize
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 106, in _login
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 83, in login_step
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 650, in _download_json
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 618, in _download_webpage
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 525, in _download_webpage_handle
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 494, in _request_webpage
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 539, in sanitized_Request
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 535, in sanitize_url
AttributeError: 'NoneType' object has no attribute 'startswith'

Verbose output (older version, success)

stephen@stephen-retina:~$ youtube-dl/youtube-dl -v --username (username) -f Source https://www.twitch.tv/videos/125983527
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--username', u'PRIVATE', u'-f', u'Source', u'https://www.twitch.tv/videos/125983527']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.03.02
[debug] Python version 2.7.13 - Darwin-16.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[twitch:vod] Downloading login page
[twitch:vod] Logging in as (username)
[twitch:vod] Downloading login redirect page
[twitch:vod] 125983527: Downloading vod info JSON
[twitch:vod] 125983527: Downloading vod access token
[twitch:vod] 125983527: Downloading m3u8 information
[debug] Invoking downloader on u'https://vod172-ttvnw.akamaized.net/v1/AUTH_system/vods_351a/geekandsundry_24677685584_611025851/chunked/index-dvr.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 10544
[download] Destination: Critical Role Ep88 - Release the Kraken! #GNSLive #VoxMachina -v125983527.mp4
...(downloading)
@stephenwade
Copy link
Author

@stephenwade stephenwade commented Mar 5, 2017

I think this was caused by #11974, since it changes the Twitch login code.

@stephenwade stephenwade changed the title Regression in 2017.03.05: downloading Twitch VODs behind a subscription Regression in 2017.03.05: downloading Twitch VODs that require login Mar 5, 2017
@dstftw dstftw closed this in 4b5de77 Mar 5, 2017
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
1 participant
You can’t perform that action at this time.