mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2026-07-30 18:19:04 +00:00
[infomaniak] Warn on incomplete multi-entry shares
Follow up on PR review
This commit is contained in:
parent
559d09c245
commit
e8a08dad41
|
|
@ -78,7 +78,13 @@ class InfomaniakVod2IE(InfoExtractor):
|
||||||
'display_id': share_id,
|
'display_id': share_id,
|
||||||
}, entries[0], rev=True)
|
}, entries[0], rev=True)
|
||||||
|
|
||||||
|
missing_id = sum(1 for e in entries if not e.get('id'))
|
||||||
entries = [e for e in entries if e.get('id')]
|
entries = [e for e in entries if e.get('id')]
|
||||||
|
if missing_id:
|
||||||
|
self.report_warning(
|
||||||
|
'Share contains multiple media entries, but %d item(s) are missing an id and will be skipped. '
|
||||||
|
'If this looks incorrect, please report the URL.' % missing_id,
|
||||||
|
share_id, only_once=True)
|
||||||
if not entries:
|
if not entries:
|
||||||
# Keep the error message actionable for site support requests
|
# Keep the error message actionable for site support requests
|
||||||
raise ExtractorError('Unable to find any media in share JSON', expected=True)
|
raise ExtractorError('Unable to find any media in share JSON', expected=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue