mirror of https://github.com/yt-dlp/yt-dlp.git
Update instagram.py
This commit is contained in:
parent
d59a219b65
commit
2ab7c62bcd
|
@ -59,7 +59,10 @@ class InstagramBaseIE(InfoExtractor):
|
||||||
|
|
||||||
shared_data = self._parse_json(self._search_regex(
|
shared_data = self._parse_json(self._search_regex(
|
||||||
r'\["XIGSharedData",\s*\[\],\s*({.+?}),\d+\]', login_webpage, 'shared data', default='{}'), None)
|
r'\["XIGSharedData",\s*\[\],\s*({.+?}),\d+\]', login_webpage, 'shared data', default='{}'), None)
|
||||||
shared_data = shared_data.get('native', {})
|
if shared_data.get('native', {}).get('config', {}).get('csrf_token'):
|
||||||
|
shared_data = shared_data['native']
|
||||||
|
else:
|
||||||
|
shared_data = json.loads(shared_data.get('raw', '{}'))
|
||||||
|
|
||||||
login = self._download_json(
|
login = self._download_json(
|
||||||
f'{self._LOGIN_URL}/ajax/', None, note='Logging in', headers={
|
f'{self._LOGIN_URL}/ajax/', None, note='Logging in', headers={
|
||||||
|
|
Loading…
Reference in New Issue