mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
Update bilibili.py
This commit is contained in:
parent
3cb5e4db54
commit
9d6e306d7d
1 changed files with 9 additions and 0 deletions
|
|
@ -1141,6 +1141,12 @@ class BilibiliCheeseBaseIE(BilibiliBaseIE):
|
||||||
query={'avid': aid, 'cid': cid, 'ep_id': ep_id, 'fnval': 16, 'fourk': 1},
|
query={'avid': aid, 'cid': cid, 'ep_id': ep_id, 'fnval': 16, 'fourk': 1},
|
||||||
headers=self._HEADERS, note='Downloading playinfo')['data']
|
headers=self._HEADERS, note='Downloading playinfo')['data']
|
||||||
|
|
||||||
|
if traverse_obj(play_info, 'is_drm'):
|
||||||
|
self.report_drm(ep_id)
|
||||||
|
if traverse_obj(play_info, 'is_preview'):
|
||||||
|
self.report_warning('Only preview is available. Login and purchase course '
|
||||||
|
f'to download full episode. {self._login_hint()}', ep_id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': str_or_none(ep_id),
|
'id': str_or_none(ep_id),
|
||||||
'episode_id': str_or_none(ep_id),
|
'episode_id': str_or_none(ep_id),
|
||||||
|
|
@ -1193,6 +1199,9 @@ class BilibiliCheeseIE(BilibiliCheeseBaseIE):
|
||||||
'thumbnail': r're:^https?://.*\.(jpg|jpeg|png)$',
|
'thumbnail': r're:^https?://.*\.(jpg|jpeg|png)$',
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.bilibili.com/cheese/play/ep1881588',
|
||||||
|
'expected_exception': 'ExtractorError', # widevine DRM
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue