mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-12 14:26:49 +01:00
[youtube] Make --write-annotations non fatal (closes #21452)
This commit is contained in:
parent
7c24a58bdb
commit
c40714cdee
@ -1581,8 +1581,15 @@ def extract_id(cls, url):
|
|||||||
return video_id
|
return video_id
|
||||||
|
|
||||||
def _extract_annotations(self, video_id):
|
def _extract_annotations(self, video_id):
|
||||||
url = 'https://www.youtube.com/annotations_invideo?features=1&legacy=1&video_id=%s' % video_id
|
return self._download_webpage(
|
||||||
return self._download_webpage(url, video_id, note='Searching for annotations.', errnote='Unable to download video annotations.')
|
'https://www.youtube.com/annotations_invideo', video_id,
|
||||||
|
note='Downloading annotations',
|
||||||
|
errnote='Unable to download video annotations', fatal=False,
|
||||||
|
query={
|
||||||
|
'features': 1,
|
||||||
|
'legacy': 1,
|
||||||
|
'video_id': video_id,
|
||||||
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _extract_chapters(description, duration):
|
def _extract_chapters(description, duration):
|
||||||
|
Loading…
Reference in New Issue
Block a user