diff options
author | rzhxeo <rzhxeot7z81b4700@mailcatch.com> | 2013-10-26 23:33:32 +0200 |
---|---|---|
committer | rzhxeo <rzhxeot7z81b4700@mailcatch.com> | 2013-10-26 23:33:32 +0200 |
commit | 6e76104d66624a8f742d1e0d210a35452a79aec8 (patch) | |
tree | f1fec3abfc02038fe7ae505c024b0a3992f2d064 /youtube_dl | |
parent | 7df286540f893f7fbba07da8ba3b09dd7c9027c4 (diff) |
[YouPornIE] Make webpage download more robust
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youporn.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py index 704ee89dc..e46a9b4d6 100644 --- a/youtube_dl/extractor/youporn.py +++ b/youtube_dl/extractor/youporn.py @@ -17,7 +17,7 @@ from ..aes import ( ) class YouPornIE(InfoExtractor): - _VALID_URL = r'^(?:https?://)?(?:\w+\.)?youporn\.com/watch/(?P<videoid>[0-9]+)/(?P<title>[^/]+)' + _VALID_URL = r'^(?:https?://)?(?:www\.)?(?P<url>youporn\.com/watch/(?P<videoid>[0-9]+)/(?P<title>[^/]+))' _TEST = { u'url': u'http://www.youporn.com/watch/505835/sex-ed-is-it-safe-to-masturbate-daily/', u'file': u'505835.mp4', @@ -34,6 +34,7 @@ class YouPornIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('videoid') + url = 'http://www.' + mobj.group('url') req = compat_urllib_request.Request(url) req.add_header('Cookie', 'age_verified=1') |