Skip to content

Commit

Permalink
[youporn] Improve extraction of metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
marieell committed Nov 26, 2022
1 parent c0caa80 commit 4e73dae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions yt_dlp/extractor/youporn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ..utils import (
extract_attributes,
int_or_none,
merge_dicts,
str_to_int,
unified_strdate,
url_or_none,
Expand Down Expand Up @@ -159,7 +160,8 @@ def extract_tag_box(regex, title):
r'(?s)Tags:.*?</div>\s*<div[^>]+class=["\']tagBoxContent["\'][^>]*>(.+?)</div>',
'tags')

return {
data = self._search_json_ld(webpage, video_id, expected_type='VideoObject', fatal=False)
return merge_dicts(data, {
'id': video_id,
'display_id': display_id,
'title': title,
Expand All @@ -174,4 +176,4 @@ def extract_tag_box(regex, title):
'tags': tags,
'age_limit': age_limit,
'formats': formats,
}
})

0 comments on commit 4e73dae

Please sign in to comment.