diff --git a/yt_dlp/extractor/rule34video.py b/yt_dlp/extractor/rule34video.py index 7e80f3dde2..915e3e86df 100644 --- a/yt_dlp/extractor/rule34video.py +++ b/yt_dlp/extractor/rule34video.py @@ -9,6 +9,7 @@ get_element_html_by_class, get_elements_by_class, int_or_none, + merge_dicts, parse_count, parse_duration, unescapeHTML, @@ -92,16 +93,17 @@ def _real_extract(self, url): uploader = clean_html(uploader_link) uploader_url = extract_attributes(uploader_link or '').get('href') - return { - **traverse_obj(self._search_json_ld(webpage, video_id, default={}), ({ - 'title': 'title', - 'view_count': 'view_count', - 'like_count': 'like_count', - 'duration': 'duration', - 'timestamp': 'timestamp', - 'description': 'description', - 'thumbnail': ('thumbnails', 0, 'url'), - })), + json_ld = traverse_obj(self._search_json_ld(webpage, video_id, default={}), ({ + 'title': 'title', + 'view_count': 'view_count', + 'like_count': 'like_count', + 'duration': 'duration', + 'timestamp': 'timestamp', + 'description': 'description', + 'thumbnail': ('thumbnails', 0, 'url'), + })) + + return merge_dicts({ 'id': video_id, 'formats': formats, 'title': self._html_extract_title(webpage), @@ -121,4 +123,4 @@ def _real_extract(self, url): 'categories': categories, 'tags': list(map(unescapeHTML, re.findall( r']+\bhref="https://rule34video\.com/tags/\d+/"[^>]*>(?P[^>]*)', webpage))), - } + }, json_ld)