mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.5k stars 942 forks source link

[Instagram] Download only new files (daily job) #5204

Open ryphez opened 7 months ago

ryphez commented 7 months ago

Hi,

I'm trying to make a cron job to run gallery-dl on Instagram profiles daily and want to only go thru new images in this script once I've downloaded the full set separately. Are there any options I can enable to either only do posts in the last day? Stories seem easy since those expire and should always be "new"

Thanks!

mikf commented 7 months ago

-A/--abort should work as long as you don't move previously downloaded files.

  -A, --abort N               Stop current extractor run after N consecutive
                              file downloads were skipped

Otherwise use a download archive or use --filter with abort().

ryphez commented 7 months ago

Awesome thank you! I don’t plan to move any files. I have them downloaded to a mount point on my server with gallery-dl running in a vm. I’ll experiment with this.

For abort, does gallery-dl always download chronologically from Instagram? I’d imagine so, but how does it handle downloading timeline then story of timeline is not updated, but stories or reels are? Would the abort just skip the type?

mikf commented 7 months ago

For abort, does gallery-dl always download chronologically from Instagram?

For Instagram, posts are returned from newest to oldest (like it is displayed on the site itself). There is also an order-files option for file order inside posts.

but how does it handle downloading timeline then story of timeline is not updated, but stories or reels are?

-A/--abort works per input URL. When you have it download posts, reels, and stories and it aborts on posts, it'll go on with reels and stories next and possible abort for these as well.

Also, I think reels are included in the regular posts timeline.