aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2011-10-18 18:38:17 -0200
committerRogério Brito <rbrito@ime.usp.br>2011-10-18 18:38:17 -0200
commita1a8713aadd48e32f8c53a1d8e673a2fdd4b91bc (patch)
treee08a99ae5ddd2f6a9aa290e511c71002401650ce
parent6501a06d4641ffacfccd66d3de4ad5ab0f7db7fb (diff)
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.
-rwxr-xr-xyoutube-dl2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl
index 450da8ebd..f8e9095ae 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -3413,7 +3413,7 @@ class XVideosIE(InfoExtractor):
self.report_webpage(video_id)
- request = urllib2.Request(url)
+ request = urllib2.Request(r'http://www.xvideos.com/video' + video_id)
try:
webpage = urllib2.urlopen(request).read()
except (urllib2.URLError, httplib.HTTPException, socket.error), err: