aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-08-23 17:23:34 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-08-23 17:23:34 +0200
commitfc483bb6af4bce923c65a67618019a72071f30ff (patch)
treec5a5e8c56f06b43b49eef28619d30c169b2168d0 /youtube_dl
parent53b0f3e4e290016ccc0a905ec8a18efb5bd9af8a (diff)
[xhamster] use determine_ext
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/xhamster.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py
index 0fd077583..88b8b6be0 100644
--- a/youtube_dl/extractor/xhamster.py
+++ b/youtube_dl/extractor/xhamster.py
@@ -4,6 +4,7 @@ from .common import InfoExtractor
from ..utils import (
compat_urllib_parse,
unescapeHTML,
+ determine_ext,
ExtractorError,
)
@@ -36,7 +37,6 @@ 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].split('?')[0]
video_title = self._html_search_regex(r'<title>(?P<title>.+?) - xHamster\.com</title>',
webpage, u'title')
@@ -64,7 +64,7 @@ class XHamsterIE(InfoExtractor):
return [{
'id': video_id,
'url': video_url,
- 'ext': video_extension,
+ 'ext': determine_ext(video_url),
'title': video_title,
'description': video_description,
'upload_date': video_upload_date,