mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
[ie/instagram] Improve it more
Authored by: bashonly
This commit is contained in:
parent
e3d089ba9d
commit
e0e481e668
1 changed files with 8 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
from ..networking.exceptions import HTTPError
|
from ..networking.exceptions import HTTPError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
bug_reports_message,
|
||||||
decode_base_n,
|
decode_base_n,
|
||||||
encode_base_n,
|
encode_base_n,
|
||||||
filter_dict,
|
filter_dict,
|
||||||
|
@ -474,7 +475,13 @@ def _real_extract(self, url):
|
||||||
self.raise_login_required(error)
|
self.raise_login_required(error)
|
||||||
elif error:
|
elif error:
|
||||||
raise ExtractorError(error, expected=True)
|
raise ExtractorError(error, expected=True)
|
||||||
raise ExtractorError('Instagram sent empty media response')
|
elif len(video_id) > 28:
|
||||||
|
# It's a private post (video_id == shortcode + 28 extra characters)
|
||||||
|
self.raise_login_required()
|
||||||
|
raise ExtractorError(
|
||||||
|
'Instagram sent empty media response; check if this post is '
|
||||||
|
'accessible in your browser without being logged-in. If it is'
|
||||||
|
f'{bug_reports_message(before=",")}', expected=True)
|
||||||
media.update(xdt_shortcode_media)
|
media.update(xdt_shortcode_media)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue