Skip to content

Commit

Permalink
[ie/rule34video] Extract tags (#7117)
Browse files Browse the repository at this point in the history
Authored by: soundchaser128
  • Loading branch information
soundchaser128 committed Sep 17, 2023
1 parent 30ba233 commit 5849392
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions yt_dlp/extractor/rule34video.py
@@ -1,6 +1,6 @@
import re

from ..utils import parse_duration
from ..utils import parse_duration, unescapeHTML
from .common import InfoExtractor


Expand All @@ -16,7 +16,8 @@ class Rule34VideoIE(InfoExtractor):
'title': 'Shot It-(mmd hmv)',
'thumbnail': 'https://rule34video.com/contents/videos_screenshots/3065000/3065157/preview.jpg',
'duration': 347.0,
'age_limit': 18
'age_limit': 18,
'tags': 'count:14'
}
},
{
Expand All @@ -28,7 +29,8 @@ class Rule34VideoIE(InfoExtractor):
'title': 'Lara in Trouble Ep. 7 [WildeerStudio]',
'thumbnail': 'https://rule34video.com/contents/videos_screenshots/3065000/3065296/preview.jpg',
'duration': 938.0,
'age_limit': 18
'age_limit': 18,
'tags': 'count:50'
}
},
]
Expand Down Expand Up @@ -57,5 +59,7 @@ def _real_extract(self, url):
'title': title,
'thumbnail': thumbnail,
'duration': parse_duration(duration),
'age_limit': 18
'age_limit': 18,
'tags': list(map(unescapeHTML, re.findall(
r'<a class="tag_item"[^>]+\bhref="https://rule34video\.com/tags/\d+/"[^>]*>(?P<tag>[^>]*)</a>', webpage))),
}

0 comments on commit 5849392

Please sign in to comment.