XHamsterIE: Fix video extension
authorrzhxeo <rzhxeo@users.noreply.github.com>
Fri, 23 Aug 2013 14:33:41 +0000 (16:33 +0200)
committerrzhxeo <rzhxeo@users.noreply.github.com>
Fri, 23 Aug 2013 14:33:41 +0000 (16:33 +0200)
Cut off GET parameter

youtube_dl/extractor/xhamster.py

index 0f1feeffd777ccc152b1ea1c4bb15dc00dc6b494..5bedc25ce66421d7c6676793be49a9832dcae6ec 100644 (file)
@@ -36,7 +36,7 @@ class XHamsterIE(InfoExtractor):
             video_url = compat_urllib_parse.unquote(mobj.group('file'))
         else:
             video_url = mobj.group('server')+'/key='+mobj.group('file')
-        video_extension = video_url.split('.')[-1]
+        video_extension = video_url.split('.')[-1].split('?')[0]
 
         video_title = self._html_search_regex(r'<title>(?P<title>.+?) - xHamster\.com</title>',
             webpage, u'title')