aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/xhamster.py
diff options
context:
space:
mode:
authorrzhxeo <rzhxeo@users.noreply.github.com>2013-09-14 05:42:00 +0200
committerrzhxeo <rzhxeo@users.noreply.github.com>2013-09-14 05:42:00 +0200
commit9a1c32dc54fdefcd6b5e03fac1a0dd65383b6f99 (patch)
treef1e78b1706796e070062e879963ad4e6c8abcb17 /youtube_dl/extractor/xhamster.py
parenta921f40799d2ecb4be53b3241d2dbfc80f804d73 (diff)
downloadyoutube-dl-9a1c32dc54fdefcd6b5e03fac1a0dd65383b6f99.tar.xz
XHamsterIE: Add support for new URL format
Diffstat (limited to 'youtube_dl/extractor/xhamster.py')
-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 88b8b6be0..e50069586 100644
--- a/youtube_dl/extractor/xhamster.py
+++ b/youtube_dl/extractor/xhamster.py
@@ -11,7 +11,7 @@ from ..utils import (
class XHamsterIE(InfoExtractor):
"""Information Extractor for xHamster"""
- _VALID_URL = r'(?:http://)?(?:www.)?xhamster\.com/movies/(?P<id>[0-9]+)/.*\.html'
+ _VALID_URL = r'(?:http://)?(?P<url>(?:www\.)?xhamster\.com/movies/(?P<id>[0-9]+)/.*\.html(?:\?.*)?)'
_TEST = {
u'url': u'http://xhamster.com/movies/1509445/femaleagent_shy_beauty_takes_the_bait.html',
u'file': u'1509445.flv',
@@ -27,7 +27,7 @@ class XHamsterIE(InfoExtractor):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
- mrss_url = 'http://xhamster.com/movies/%s/.html' % video_id
+ mrss_url = 'http://' + mobj.group('url')
webpage = self._download_webpage(mrss_url, video_id)
mobj = re.search(r'\'srv\': \'(?P<server>[^\']*)\',\s*\'file\': \'(?P<file>[^\']+)\',', webpage)