Browse Source

XHamsterIE: Fix video extension

Cut off GET parameter
master
rzhxeo 11 years ago
parent
commit
ce34e9ce5e
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/extractor/xhamster.py

2
youtube_dl/extractor/xhamster.py

@ -36,7 +36,7 @@ class XHamsterIE(InfoExtractor):
video_url = compat_urllib_parse.unquote(mobj.group('file')) video_url = compat_urllib_parse.unquote(mobj.group('file'))
else: else:
video_url = mobj.group('server')+'/key='+mobj.group('file') 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>', video_title = self._html_search_regex(r'<title>(?P<title>.+?) - xHamster\.com</title>',
webpage, u'title') webpage, u'title')

Loading…
Cancel
Save