mirror of
https://github.com/instaloader/instaloader.git
synced 2026-10-24 01:19:38 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c116683c2 | ||
|
|
054fa47245 |
@@ -1,7 +1,7 @@
|
|||||||
"""Download pictures (or videos) along with their captions and other metadata from Instagram."""
|
"""Download pictures (or videos) along with their captions and other metadata from Instagram."""
|
||||||
|
|
||||||
|
|
||||||
__version__ = '4.8'
|
__version__ = '4.8.1'
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -379,7 +379,11 @@ class Post:
|
|||||||
if self.is_video:
|
if self.is_video:
|
||||||
version_urls = [self._field('video_url')]
|
version_urls = [self._field('video_url')]
|
||||||
if self._context.iphone_support and self._context.is_logged_in:
|
if self._context.iphone_support and self._context.is_logged_in:
|
||||||
version_urls.extend(version['url'] for version in self._iphone_struct['video_versions'])
|
try:
|
||||||
|
version_urls.extend(version['url'] for version in self._iphone_struct['video_versions'])
|
||||||
|
except (InstaloaderException, KeyError, IndexError) as err:
|
||||||
|
self._context.error(f"Unable to fetch high-quality video version of {self}: {err}")
|
||||||
|
return version_urls[0]
|
||||||
else:
|
else:
|
||||||
return version_urls[0]
|
return version_urls[0]
|
||||||
url_candidates: List[Tuple[int, str]] = []
|
url_candidates: List[Tuple[int, str]] = []
|
||||||
@@ -1127,7 +1131,11 @@ class StoryItem:
|
|||||||
if self.is_video:
|
if self.is_video:
|
||||||
version_urls = [self._node['video_resources'][-1]['src']]
|
version_urls = [self._node['video_resources'][-1]['src']]
|
||||||
if self._context.iphone_support and self._context.is_logged_in:
|
if self._context.iphone_support and self._context.is_logged_in:
|
||||||
version_urls.extend(version['url'] for version in self._iphone_struct['video_versions'])
|
try:
|
||||||
|
version_urls.extend(version['url'] for version in self._iphone_struct['video_versions'])
|
||||||
|
except (InstaloaderException, KeyError, IndexError) as err:
|
||||||
|
self._context.error(f"Unable to fetch high-quality video version of {self}: {err}")
|
||||||
|
return version_urls[0]
|
||||||
else:
|
else:
|
||||||
return version_urls[0]
|
return version_urls[0]
|
||||||
url_candidates: List[Tuple[int, str]] = []
|
url_candidates: List[Tuple[int, str]] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user