instaloader / instaloader

Download pictures (or videos) along with their captions and other metadata from Instagram.
https://instaloader.github.io/
MIT License
8.76k stars 1.18k forks source link

Posts shared by multiple account now have a different profile than before version 4.13. #2334

Closed syldor closed 3 weeks ago

syldor commented 2 months ago

Describe the bug Example of this post: https://www.instagram.com/p/C-kE8f5Nj4O/, which is a cross post between oktarozge and niveaturkiye.

Before version 4.13 the following query:

instaloader --no-videos --post-filter="date_utc >= datetime(2024, 8, 10)" --filename-pattern={shortcode}_{date_utc}_UTC_{profile} niveaturkiye

would give file name

niveaturkiye/C-kE8f5Nj4O_2024-08-12_08-50-11_UTC_niveaturkiye.jpg

account being niveaturkiye

Now it gives

niveaturkiye/C-kE8f5Nj4O_2024-08-12_08-50-11_UTC_oktarozge.jpg

account being oktarozge.

I don't know if that's a bug maybe it is expected behaviour, but that's a change.

How are those posts shared by multiple accounts handled?

ekalin commented 2 months ago

This has indeed changed in version 4.13. A new way to query posts is used, and this query now returns the "main" (or first) profile in these multiple profile posts, even when downloading from the second profile. Previously it would return always the profile being fetched.

If you use {target} instead of {profile} you'll get the profile being downloaded.

aandergr commented 1 month ago

Thanks for that clarification. We updated the release notes of Version 4.13 with a note:

Post.owner_profile may now return a different user than the one being downloaded for posts shared by multiple users. To ensure filenames reflect the downloading profile, use {target} in the filename pattern.

github-actions[bot] commented 1 month ago

There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity.