diff options
author | megustamucho <megustamucho@users.noreply.github.com> | 2014-09-20 22:41:45 +1000 |
---|---|---|
committer | megustamucho <megustamucho@users.noreply.github.com> | 2014-09-20 22:41:45 +1000 |
commit | 34e14a9beb3abe76bcda1154030978979c6c1d1d (patch) | |
tree | b773b8f873084056eea80826e776569de90ec090 /youtube_dl/extractor/drtuber.py | |
parent | a8aa99442f0bd6e3c65bd6c464dfd0a87c99f65d (diff) | |
parent | ffb5b05db1f55b9b6e188d2c86befe0493829927 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'youtube_dl/extractor/drtuber.py')
-rw-r--r-- | youtube_dl/extractor/drtuber.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/drtuber.py b/youtube_dl/extractor/drtuber.py index d5bfd7f22..ca274dff6 100644 --- a/youtube_dl/extractor/drtuber.py +++ b/youtube_dl/extractor/drtuber.py @@ -19,7 +19,7 @@ class DrTuberIE(InfoExtractor): 'like_count': int, 'dislike_count': int, 'comment_count': int, - 'categories': list, # NSFW + 'categories': ['Babe', 'Blonde', 'Erotic', 'Outdoor', 'Softcore', 'Solo'], 'thumbnail': 're:https?://.*\.jpg$', 'age_limit': 18, } @@ -52,9 +52,9 @@ class DrTuberIE(InfoExtractor): r'<span class="comments_count">([\d,\.]+)</span>', webpage, 'comment count', fatal=False)) - cats_str = self._html_search_regex( - r'<meta name="keywords" content="([^"]+)"', webpage, 'categories', fatal=False) - categories = None if cats_str is None else cats_str.split(' ') + cats_str = self._search_regex( + r'<span>Categories:</span><div>(.+?)</div>', webpage, 'categories', fatal=False) + categories = [] if not cats_str else re.findall(r'<a title="([^"]+)"', cats_str) return { 'id': video_id, |