don't try to call iPhone api when comparing profile_pic URL (#1681)
This commit is contained in:
parent
4bb32e3c5a
commit
6a42906697
@ -562,7 +562,7 @@ class Instaloader:
|
||||
if latest_stamps is None:
|
||||
self.download_profilepic(profile)
|
||||
return
|
||||
profile_pic_basename = profile.profile_pic_url.split('/')[-1].split('?')[0]
|
||||
profile_pic_basename = profile.profile_pic_url_no_iphone.split('/')[-1].split('?')[0]
|
||||
saved_basename = latest_stamps.get_profile_pic(profile.username)
|
||||
if saved_basename == profile_pic_basename:
|
||||
return
|
||||
|
@ -958,6 +958,13 @@ class Profile:
|
||||
else:
|
||||
return self._metadata("profile_pic_url_hd")
|
||||
|
||||
@property
|
||||
def profile_pic_url_no_iphone(self) -> str:
|
||||
"""Return URL of lower-quality profile picture.
|
||||
|
||||
.. versionadded:: 4.9.3"""
|
||||
return self._metadata("profile_pic_url_hd")
|
||||
|
||||
def get_profile_pic_url(self) -> str:
|
||||
""".. deprecated:: 4.0.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user