Compare commits

...

2 Commits

Author SHA1 Message Date
bashonly
0f5aa10fa0
revert unrelated 2024-01-19 09:29:21 +00:00
SirElderling
8977a74fc1 [BiliBili] - re-added extraction methods as fallback 2024-01-19 09:13:55 +00:00

View File

@ -223,6 +223,7 @@ class BilibiliBaseIE(InfoExtractor):
class BiliBiliIE(BilibiliBaseIE):
_VALID_URL = r'https?://(?:www\.)?bilibili\.com/(?:video/|festival/\w+\?(?:[^#]*&)?bvid=)[aAbB][vV](?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://www.bilibili.com/video/BV13x41117TL',
'info_dict': {
@ -1921,9 +1922,11 @@ class BiliIntlIE(BiliIntlBaseIE):
# XXX: webpage metadata may not accurate, it just used to not crash when video_data not found
return merge_dicts(
self._parse_video_metadata(video_data), {
'title': get_element_by_class('bstar-meta__title', webpage),
'description': get_element_by_class('bstar-meta__desc', webpage),
})
'title': get_element_by_class(
'bstar-meta__title', webpage) or self._html_search_meta('og:title', webpage),
'description': get_element_by_class(
'bstar-meta__desc', webpage) or self._html_search_meta('og:description'),
} or self._search_json_ld(webpage, video_id, fatal=False))
def _get_comments_reply(self, root_id, next_id=0, display_id=None):
comment_api_raw_data = self._download_json(