Compare commits

..

2 Commits

Author SHA1 Message Date
bashonly
bc1878b5cd
simplify 2024-02-01 23:23:25 +00:00
bashonly
c02cf0c70a
minutia 2024-02-01 23:21:58 +00:00

View File

@ -619,14 +619,12 @@ class ORFONIE(InfoExtractor):
def _real_extract(self, url):
video_id, display_id = self._match_valid_url(url).group('id', 'slug')
webpage = self._download_webpage(url, display_id)
json_ld_data = self._search_json_ld(webpage, display_id, fatal=False)
return {
'id': video_id,
'title': (json_ld_data.get('title')
or self._html_search_meta(['og:title', 'twitter:title'], webpage)),
'description': (json_ld_data.get('description')
or self._html_search_meta(['description', 'og:description', 'twitter:description'], webpage)),
**json_ld_data,
**self._extract_video(video_id, display_id)
'title': self._html_search_meta(['og:title', 'twitter:title'], webpage, default=None),
'description': self._html_search_meta(
['description', 'og:description', 'twitter:description'], webpage, default=None),
**self._search_json_ld(webpage, display_id, fatal=False),
**self._extract_video(video_id, display_id),
}