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

Pytube Exception: Multiple videos met this criteria #6

Closed
lwgray opened this issue Oct 1, 2017 · 0 comments
Closed

Pytube Exception: Multiple videos met this criteria #6

lwgray opened this issue Oct 1, 2017 · 0 comments

Comments

@lwgray
Copy link
Contributor

lwgray commented Oct 1, 2017

This based on the assumptions that previous issues #1 #2 #4 have been fixed( #5 )
The Error means that the mp4 video you are trying to download has multiple resolutions and you have to decide which one you would like to get.

Command:

python sum.py -u https://www.youtube.com/watch?v=xRJCOz3AfYY

Error:

raise MultipleObjectsReturned('Multiple videos met this criteria.')
pytube.exceptions.MultipleObjectsReturned: Multiple videos met this criteria.

Solution:

filter videos by type(mp4) and highest available resolution
yt.filter('mp4')[-1]
Explanation

lwgray added a commit to lwgray/vidsum that referenced this issue Oct 1, 2017
Prior to this change:
- If a download request is made for a video and
the video has multiple types and resolutions then a MultipleObjects Exception is raised

This change uses pytube filter function to select a single video with the highest resolution for download

closes:
Github issue OpenGenus#6
lwgray added a commit to lwgray/vidsum that referenced this issue Oct 1, 2017
Prior to this change:
- If a download request is made for a video and
the video has multiple types and resolutions then a MultipleObjects Exception is raised

This change uses pytube filter function to select a single video with the highest resolution for download

closes:
Github issue OpenGenus#6
@lwgray lwgray closed this as completed Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants