[issue1523] youtube-dl stuck at the end of HTTPS stream
New submission from Grom PE <i@grompe.org.ru>: youtube-dl version 2013.05.05 up to newest 2013.06.34.4 when run with pypy 2.0.2 gets stuck at the end of HTTPS stream, which can be seen in the console as: $ pypy youtube-dl 7-tNUur2YoU [youtube] Setting language [youtube] 7-tNUur2YoU: Downloading video webpage Changing the line 413 in file "youtube_dl/extractor/youtube.py" to have http link instead makes the stream read correctly: url = 'http://www.youtube.com/watch?v=%s&gl=US&hl=en&has_verified=1' % video_id If left as https, it gets stuck at the line 416: video_webpage_bytes = compat_urllib_request.urlopen(request).read() While using Python 2.7 and 3.3 youtube-dl has no such problem. Other HTTPS streams seem to be read normally. Correct behavior: $ pypy youtube-dl 7-tNUur2YoU [youtube] Setting language [youtube] 7-tNUur2YoU: Downloading video webpage [youtube] 7-tNUur2YoU: Downloading video info webpage [youtube] 7-tNUur2YoU: Extracting video information [download] Destination: Goldfish - We Come Together (OFFICIAL)-7-tNUur2YoU.mp4 [download] 0.2% of 66.60MiB at 172.09KiB/s ETA 06:35 youtube-dl: http://rg3.github.io/youtube-dl/download.html ---------- messages: 5888 nosy: Grom PE, pypy-issue priority: bug release: 2.0 status: unread title: youtube-dl stuck at the end of HTTPS stream ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1523> ________________________________________
Grom PE <i@grompe.org.ru> added the comment: Minimal test program: import urllib2 import socket # Commenting the following line out removes the bug socket.setdefaulttimeout(300) # Changing the following to http:// link removes the bug request = urllib2.Request('https://www.youtube.com/') print "Reading" urllib2.urlopen(request).read() print "Done reading" ---------- status: unread -> chatting title: youtube-dl stuck at the end of HTTPS stream -> read() stuck at the end of HTTPS stream ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1523> ________________________________________
Grom PE <i@grompe.org.ru> added the comment: Further testing and info, with help from IRC: test fails on 64-bit Win7 and 32-bit WinXP. works on 64-bit x86 Linux. - changing URL to most other https sites makes it work, Google sites won't work, some other sites (https://webxcope.com/) won't work - changing URL to http makes it work - removing default socket timeout makes it work - running it with CPython 2.7 makes it work ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1523> ________________________________________
Grom PE <i@grompe.org.ru> added the comment: Minimal test program provided works on PyPy 2.3.0 / Windows 7. ---------- release: 2.0 -> 2.3 status: chatting -> resolved ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue1523> ________________________________________
participants (1)
-
Grom PE