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

Problem with vimeo's parser using import from python, however works fine with the executable #1805

Closed
iTaybb opened this issue Nov 22, 2013 · 1 comment

Comments

@iTaybb
Copy link
Contributor

@iTaybb iTaybb commented Nov 22, 2013

I try to run this python script:

import youtube_dl

ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s', 'verbose': True})
ydl.add_default_info_extractors()

result = ydl.extract_info('http://vimeo.com/69070555', download=False)

and get youtube_dl.utils.DownloadError: Unable to extract info section. Downloading the video through the executable of the same build seems to work fine.

Kind of looked into it, and found that the data retrieved from vimeo's server is gzipped, but not decompressed. Running

del youtube_dl.utils.std_headers['Accept-Encoding']

seems to solve the problem.

Where did I go wrong? Is that a bug?
Thanks.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 22, 2013

I faced that same problem and you just need to install the YoutubeDLHandler (found in youtube_dl.utils), it will decompress the gzipped response. You can use the function youtube_dl._setup_opener for that.

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.