diff --git a/instaloader/instaloader.py b/instaloader/instaloader.py index 8754e4e..e34039e 100644 --- a/instaloader/instaloader.py +++ b/instaloader/instaloader.py @@ -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 diff --git a/instaloader/structures.py b/instaloader/structures.py index adaa222..2e604e8 100644 --- a/instaloader/structures.py +++ b/instaloader/structures.py @@ -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