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

Extractor Error: keyerror: streams on lots of VRV content #17810

Closed
cclloyd opened this issue Oct 6, 2018 · 0 comments
Closed

Extractor Error: keyerror: streams on lots of VRV content #17810

cclloyd opened this issue Oct 6, 2018 · 0 comments
Labels

Comments

@cclloyd
Copy link

@cclloyd cclloyd commented Oct 6, 2018

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

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)

KeyError when using fallback method for getting stream info

On lots of VRV videos (In my experience, My Hero Academia S2 episodes 28-30), I'm getting an error when it attempts to get the stream info.

ERROR: An extractor error has occurred. (caused by KeyError('streams')); 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.
Traceback (most recent call last):
  File "/Users/cclloyd/Downloads/youtube-dl/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/cclloyd/Downloads/youtube-dl/youtube_dl/extractor/vrv.py", line 137, in _real_extract
    streams_path = video_data['__links__']['streams']['href']
KeyError: 'streams'
Traceback (most recent call last):
  File "/Users/cclloyd/Downloads/youtube-dl/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/cclloyd/Downloads/youtube-dl/youtube_dl/extractor/vrv.py", line 137, in _real_extract
    streams_path = video_data['__links__']['streams']['href']
KeyError: 'streams'

This is happening because when media_resource['streams'] doesn't exist, video_data['__links__']['streams'] also won't exist. (However, videos that work normally do have the streams attribute in video_data['__links__'] if it were called, which it normally isn't.)

Merely substituting the missing streams attribute in video_data with the URL that it would have returns a 404 for the broken episodes.

So the stream links are stored somewhere else for these episodes, or are otherwise not being loaded. It is possible the episode data is broken on VRV's end, but that's doubtful.

Calling _get_cms_resource() on cms:/videos/G6K5ZM4GY/streams (the streams resource key when viewed with inspector tools from chrome) returns the stream url https://api.vrv.co/cms/v2/US/M2/-/videos/G6K5ZM4GY/streams, and that URL gives a 404 when called with _call_cms()

Yet when I inspect the player with react tools, I can see that in the json field (the video_data variable), there is a streams attribute like there should be.

Also, this may only be happening on premium only and mature content.

@dstftw dstftw closed this Oct 6, 2018
@dstftw dstftw added the duplicate label Oct 6, 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
2 participants
You can’t perform that action at this time.