aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoundchaser128 <69268557+soundchaser128@users.noreply.github.com>2023-09-17 17:09:42 +0200
committerGitHub <noreply@github.com>2023-09-17 15:09:42 +0000
commit58493923e9b6f774947a2131e5258e9f3cf816be (patch)
tree9f4755ee861f6ab79d8a49a5b65f4c1d5b213ee8
parent30ba233d4cee945756ed7344e7ddb3a90d2ae608 (diff)
[ie/rule34video] Extract tags (#7117)
Authored by: soundchaser128
-rw-r--r--yt_dlp/extractor/rule34video.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/yt_dlp/extractor/rule34video.py b/yt_dlp/extractor/rule34video.py
index 9d15f4d21..f3250b557 100644
--- a/yt_dlp/extractor/rule34video.py
+++ b/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
@@ -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'
}
},
{
@@ -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'
}
},
]
@@ -57,5 +59,7 @@ class Rule34VideoIE(InfoExtractor):
'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))),
}