This repository was archived by the owner on Oct 25, 2020. It is now read-only.
Fixed search for itags and urls according to YouTube API Pattern#41
Open
dpserretti wants to merge 2 commits into
Open
Fixed search for itags and urls according to YouTube API Pattern#41dpserretti wants to merge 2 commits into
dpserretti wants to merge 2 commits into
Conversation
cdown
suggested changes
Jan 29, 2020
| "Live and streaming videos are unsupported." | ||
| ) from None | ||
| try: | ||
| import json |
Owner
There was a problem hiding this comment.
Don't import inline, do it with the others.
| setup( | ||
| name="yturl", | ||
| version="2.0.2", | ||
| version="2.0.3", |
Owner
There was a problem hiding this comment.
We don't bump the version until the release tests pass, which are not run here. Please remove this. :-)
| try: | ||
| import json | ||
| return collections.OrderedDict([(i['itag'], i['url']) for i in | ||
| json.loads(api_response['player_response'])['streamingData'][ |
Owner
There was a problem hiding this comment.
I'm pretty sure this isn't black formatted, so CI won't be happy :-)
| return collections.OrderedDict([(i['itag'], i['url']) for i in | ||
| json.loads(api_response['player_response'])['streamingData'][ | ||
| 'formats']]) | ||
| except: |
Owner
There was a problem hiding this comment.
Don't use bare except, check the exceptions you actually care about. For example, this will even catch keyboard interrupts...
|
@dpserretti, are you going to adjust the patch? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixed search for itags and urls according to new YouTube API Pattern