Spare unnecessary full metadata fetch
This fetch was done for sidecar posts that contain a video when going through a profile. The fetched information is already present with the new profile query introduced in the last commit, making this full metadata fetch query unnecessary. Instaloader now better evaluates if that fetch must be done or not. The fetch was also (eventually unnecessarily) made when accessing get_sidecar_posts() on a Post that has been loaded with load_structure_from_file().
This commit is contained in:
parent
6c4da39372
commit
f85e49d521
@ -273,7 +273,7 @@ class Post:
|
||||
"""
|
||||
if self.typename == 'GraphSidecar':
|
||||
edges = self._field('edge_sidecar_to_children', 'edges')
|
||||
if any(edge['node']['is_video'] for edge in edges):
|
||||
if any(edge['node']['is_video'] and 'video_url' not in edge['node'] for edge in edges):
|
||||
# video_url is only present in full metadata, issue #558.
|
||||
edges = self._full_metadata['edge_sidecar_to_children']['edges']
|
||||
if end < 0:
|
||||
|
Loading…
Reference in New Issue
Block a user