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

Switching from Youtube to Vimeo, calling youtube-dl from Python #17591

Closed
lguez opened this issue Sep 16, 2018 · 2 comments
Closed

Switching from Youtube to Vimeo, calling youtube-dl from Python #17591

lguez opened this issue Sep 16, 2018 · 2 comments
Labels

Comments

@lguez
Copy link

@lguez lguez commented Sep 16, 2018

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

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)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

How do I download a video from Vimeo with youtube-dl embedded in Python? It works from the command line:

youtube-dl https://vimeo.com/15991774

(works)

and it works from Python if it is the first video I download:

import youtube_dl
ydl = youtube_dl.YoutubeDL({})
ydl.download(["https://vimeo.com/15991774"])

(works)

However, it does not work after downloading a video from Youtube:

ydl.download(["https://www.youtube.com/watch?v=RwdY7Eqyguo"])

(works)

ydl.download(["https://vimeo.com/15991774"])

does not work:

[vimeo] 15991774: Downloading webpage
[vimeo] 15991774: Extracting information
[vimeo] 15991774: Downloading webpage
ERROR: Unable to extract info section (caused by ExtractorError("Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); 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.",)); 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.

DownloadError Traceback (most recent call last)
in ()
----> 1 ydl.download(["https://vimeo.com/15991774"])

/home/guez/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py in download(self, url_list)
1999 # It also downloads the videos
2000 res = self.extract_info(
-> 2001 url, force_generic_extractor=self.params.get('force_generic_extractor', False))
2002 except UnavailableVideoError:
2003 self.report_error('unable to download video')

/home/guez/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py in extract_info(self, url, download, ie_key, extra_info, process, force_generic_extractor)
813 break
814 except ExtractorError as e: # An error we somewhat expected
--> 815 self.report_error(compat_str(e), e.format_traceback())
816 break
817 except MaxDownloadsReached:

/home/guez/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py in report_error(self, message, tb)
618 _msg_header = 'ERROR:'
619 error_message = '%s %s' % (_msg_header, message)
--> 620 self.trouble(error_message, tb)
621
622 def report_file_already_downloaded(self, file_name):

/home/guez/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py in trouble(self, message, tb)
588 else:
589 exc_info = sys.exc_info()
--> 590 raise DownloadError(message, exc_info)
591 self._download_retcode = 1
592

DownloadError: ERROR: Unable to extract info section (caused by ExtractorError("Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); 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.",)); 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.

What am I missing?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 16, 2018

Post complete code. Post complete verbose log.

@dstftw dstftw closed this Sep 16, 2018
@dstftw dstftw added the incomplete label Sep 16, 2018
@lguez
Copy link
Author

@lguez lguez commented Sep 17, 2018

The code was complete. Here it is again:

#!/usr/bin/env python3

import youtube_dl

ydl = youtube_dl.YoutubeDL({"verbose": True})
ydl.download(["https://www.youtube.com/watch?v=RwdY7Eqyguo"])
ydl.download(["https://vimeo.com/15991774"])

And here is the complete output:

test_youtube_dl_stdout.txt

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.