1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-30 10:24:38 +01:00

xvideos: Normalize the URL or it will fail with some inputs.

For instance, if we give it <www.xvideos.com/video1384059>, we would
end up passing that to urllib2, which would complain about an unknown
URL type.
This commit is contained in:
Rogério Brito 2011-10-18 18:38:17 -02:00
parent 6501a06d46
commit a1a8713aad

View File

@ -3413,7 +3413,7 @@ class XVideosIE(InfoExtractor):
self.report_webpage(video_id) self.report_webpage(video_id)
request = urllib2.Request(url) request = urllib2.Request(r'http://www.xvideos.com/video' + video_id)
try: try:
webpage = urllib2.urlopen(request).read() webpage = urllib2.urlopen(request).read()
except (urllib2.URLError, httplib.HTTPException, socket.error), err: except (urllib2.URLError, httplib.HTTPException, socket.error), err: