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

IOError: Not a gzipped file #1268

Closed
Rudloff opened this issue Aug 18, 2013 · 2 comments
Closed

IOError: Not a gzipped file #1268

Rudloff opened this issue Aug 18, 2013 · 2 comments

Comments

@Rudloff
Copy link
Contributor

@Rudloff Rudloff commented Aug 18, 2013

pierre@Rudloff:~/Bureau/youtube-dl$ ./youtube-dl http://www.nanarland.com/play_video.php?vid=86 -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.nanarland.com/play_video.php?vid=86', '-v']
[debug] youtube-dl version 2013.08.17
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.1
[debug] Proxy map: {}
WARNING: Falling back on generic information extractor.
[generic] play_video.php?vid=86: Downloading webpage
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./youtube-dl/__main__.py", line 18, in <module>
  File "./youtube-dl/youtube_dl/__init__.py", line 639, in main

  File "./youtube-dl/youtube_dl/__init__.py", line 623, in _real_main

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 573, in download
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
  File "./youtube-dl/youtube_dl/extractor/common.py", line 96, in extract
  File "./youtube-dl/youtube_dl/extractor/generic.py", line 115, in _real_extract
  File "./youtube-dl/youtube_dl/extractor/common.py", line 155, in _download_webpage
  File "./youtube-dl/youtube_dl/extractor/common.py", line 141, in _download_webpage_handle
  File "/usr/lib/python2.7/gzip.py", line 249, in read
    self._read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 291, in _read
    self._read_gzip_header()
  File "/usr/lib/python2.7/gzip.py", line 185, in _read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file
@phihag
Copy link
Contributor

@phihag phihag commented Aug 28, 2013

Here's a partial hexdump of the content at that URL:

000016c0  1e b6 cf 9f b3 3f 30 ff  3e d3 e1 b3 af bf fa 5f  |.....?0.>......_|
000016d0  00 00 00 ff ff 03 00 62  e9 c9 c5 87 6a 00 00 3c  |.......b....j..<|
000016e0  2f 62 6f 64 79 3e 0d 0a  3c 2f 68 74 6d 6c 3e 0d  |/body>..</html>.|
000016f0  0a                                                |.|

So after the end of the gzip content, this webpage sends uncompressed HTML code, which the gzip binary (and apparently web browsers) just ignore, but the Python gzip module trips over.

@phihag
Copy link
Contributor

@phihag phihag commented Aug 28, 2013

Fixed, thanks for the report.

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.