Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to reduce the requests to instagram server? #6722

Open
snwefly opened this issue Dec 25, 2024 · 3 comments
Open

Any way to reduce the requests to instagram server? #6722

snwefly opened this issue Dec 25, 2024 · 3 comments

Comments

@snwefly
Copy link

snwefly commented Dec 25, 2024

First of all, thanks for the application.

I am following +150 accounts on the in instagram, usually i find <10 new post every week.

When i run gallery-dl its check each post on each account and compare it with --download-archive file.

Every gallery-dl execution sends tens of thousands queries to instagram server and it my account got suspended multiple times.

I am already using sleep-request but i didn't find any way to reduce the requests to server.

Is there any way to make gallery-dl to only check the newest/recently uploaded post date and next time i run it only check new post from previous run date?

Thanks

@mikf
Copy link
Owner

mikf commented Dec 25, 2024

There is -A / --abort:

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

And you can also use the following to stop when reaching a post before a certain date. You have to update the date manually, though.

--filter "pinned or date >= datetime(2024, 12, 1) or abort()"

To reduce the number of requests even further, use user IDs instead of names in input URLs so it doesn't have to do a "name to ID" lookup for each user:

https://www.instagram.com/instagram/
->
https://www.instagram.com/id:25025320/

@snwefly
Copy link
Author

snwefly commented Dec 25, 2024

You're are awesome, This is what exactly i was looking for.

One more question

Is there anyway to put tagged posts under requested user folder instead of the original uploader?

@mikf
Copy link
Owner

mikf commented Dec 25, 2024

/USER/tagged URLs provide tagged_owner_id, tagged_username, and tagged_full_name metadata fields that reference the USER in the URL. There're also the generally available user[...] values if you don't use IDs in URLs.

{
    "extractor": {
        "instagram": {
            "tagged": {
                "directory": ["{category}", "{tagged_username}"]
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants