diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-11-25 23:22:54 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-11-25 23:42:20 +0700 |
commit | b7785cf15685f7dfbe96cc6d2dd8089ff1363be3 (patch) | |
tree | c181a3620d4b840150482e108cf67e7e33076dde /youtube_dl | |
parent | 9105523818270cadb7ad90a3b1ea7e6f18d2dc54 (diff) |
[empflix] Relax _VALID_URL
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/tnaflix.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dl/extractor/tnaflix.py b/youtube_dl/extractor/tnaflix.py index c4ead1fcd..e57b8e318 100644 --- a/youtube_dl/extractor/tnaflix.py +++ b/youtube_dl/extractor/tnaflix.py @@ -74,7 +74,13 @@ class TNAFlixNetworkBaseIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') - display_id = mobj.group('display_id') if 'display_id' in mobj.groupdict() else video_id + for display_id_key in ('display_id', 'display_id_2'): + if display_id_key in mobj.groupdict(): + display_id = mobj.group(display_id_key) + if display_id: + break + else: + display_id = video_id webpage = self._download_webpage(url, display_id) @@ -240,7 +246,7 @@ class TNAFlixIE(TNAFlixNetworkBaseIE): class EMPFlixIE(TNAFlixNetworkBaseIE): - _VALID_URL = r'https?://(?:www\.)?empflix\.com/videos/(?P<display_id>.+?)-(?P<id>[0-9]+)\.html' + _VALID_URL = r'https?://(?:www\.)?empflix\.com/(?:videos/(?P<display_id>.+?)-|[^/]+/(?P<display_id_2>[^/]+)/video)(?P<id>[0-9]+)' _HOST = 'emp' _VKEY_SUFFIX = '-1' @@ -264,6 +270,9 @@ class EMPFlixIE(TNAFlixNetworkBaseIE): }, { 'url': 'http://www.empflix.com/videos/[AROMA][ARMD-718]-Aoi-Yoshino-Sawa-25826.html', 'only_matching': True, + }, { + 'url': 'https://www.empflix.com/amateur-porn/Amateur-Finger-Fuck/video33051', + 'only_matching': True, }] |