Continue trying after _parse_jwplayer_data fails - #16735
Closed
moyamo wants to merge 4 commits into
Closed
Conversation
dstftw
requested changes
Jun 15, 2018
| msg = video_id + ': ' + msg | ||
| if cause: | ||
| msg += ' (caused by %r)' % cause | ||
| self.msg_without_bug_report = msg |
| info = self._parse_jwplayer_data( | ||
| jwplayer_data, video_id, require_title=False, base_url=url) | ||
| return merge_dicts(info, info_dict) | ||
| except ExtractorError, e: |
Contributor
Author
There was a problem hiding this comment.
Sorry, I thought we were using python 2 for some reason.
| jwplayer_data, video_id, require_title=False, base_url=url) | ||
| return merge_dicts(info, info_dict) | ||
| except ExtractorError, e: | ||
| self.to_screen(e.msg_without_bug_report) |
| return merge_dicts(info, info_dict) | ||
| except ExtractorError, e: | ||
| self.to_screen(e.msg_without_bug_report) | ||
| self.to_screen("Trying different extractor") |
Contributor
Author
There was a problem hiding this comment.
What message should I write here. Should I just pass instead?
Contributor
Author
There was a problem hiding this comment.
I'm not sure what's wrong with this message. Should I just remove them.
Contributor
Author
There was a problem hiding this comment.
Feedback would be appreciated.
Collaborator
There was a problem hiding this comment.
There should not be any messages.
Contributor
Author
|
I added a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
xinto all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
This pull request supersedes #12516. Essentially the problem is that
_parse_jwplayer_datafails when the "JSON" structure it extracts contains variable references. However it seems an extractor further down in generic.py still works.This pull requests makes it so that if
_parse_jwplayer_datafails instead of giving up youtube-dl continues trying different extractors.