projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youtube] Parse player_url if format URLs are encrypted or DASH MPDs are requested
[youtube-dl]
/
youtube_dl
/
extractor
/
drtuber.py
diff --git
a/youtube_dl/extractor/drtuber.py
b/youtube_dl/extractor/drtuber.py
index 8baad18f6b32db642547ae646a2e46ae889e4d16..1eca82b3b46ae47e511b0f2f3f8bd6bb505cdc23 100644
(file)
--- a/
youtube_dl/extractor/drtuber.py
+++ b/
youtube_dl/extractor/drtuber.py
@@
-22,7
+22,7
@@
class DrTuberIE(InfoExtractor):
'like_count': int,
'comment_count': int,
'categories': ['Babe', 'Blonde', 'Erotic', 'Outdoor', 'Softcore', 'Solo'],
'like_count': int,
'comment_count': int,
'categories': ['Babe', 'Blonde', 'Erotic', 'Outdoor', 'Softcore', 'Solo'],
- 'thumbnail': 're:https?://.*\.jpg$',
+ 'thumbnail':
r
're:https?://.*\.jpg$',
'age_limit': 18,
}
}, {
'age_limit': 18,
}
}, {
@@
-30,6
+30,12
@@
class DrTuberIE(InfoExtractor):
'only_matching': True,
}]
'only_matching': True,
}]
+ @staticmethod
+ def _extract_urls(webpage):
+ return re.findall(
+ r'<iframe[^>]+?src=["\'](?P<url>(?:https?:)?//(?:www\.)?drtuber\.com/embed/\d+)',
+ webpage)
+
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
@@
-42,7
+48,7
@@
class DrTuberIE(InfoExtractor):
r'<source src="([^"]+)"', webpage, 'video URL')
title = self._html_search_regex(
r'<source src="([^"]+)"', webpage, 'video URL')
title = self._html_search_regex(
- (r'class="title_watch"[^>]*><
p
>([^<]+)<',
+ (r'class="title_watch"[^>]*><
(?:p|h\d+)[^>]*
>([^<]+)<',
r'<p[^>]+class="title_substrate">([^<]+)</p>',
r'<title>([^<]+) - \d+'),
webpage, 'title')
r'<p[^>]+class="title_substrate">([^<]+)</p>',
r'<title>([^<]+) - \d+'),
webpage, 'title')