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

Enable user_has_liked as IG download filter #5609

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

unfo
Copy link
Contributor

@unfo unfo commented May 18, 2024

Background and context:

  1. Instagram by default requires you to be logged in.
  2. Your account can LIKE posts.
  3. Getting all of your likes from IG can be a pain.

As an active IG user, I want to be able to download only posts I've liked.

The information of whether or not your logged-in user has liked the target post is available in the API results, but was not available to the end-user for filtering.

This small change allows user_has_liked to be used to e.g. download only liked posts of an entire IG account.

Example use:

# Configuration must include e.g.
# --cookies-from-browser FIREFOX or however you are logging in

$ gallery-dl --filter 'user_has_liked' https://www.instagram.com/imgur/

This will only download the posts that have has_liked: True set in the returned REST API data.

Note: it will still need to loop through the entire account's posts since this is done per-post basis instead of looping just the liked posts, but at least you are able to use this IG feature as a download marker.

Background and context:

1. Instagram by default requires you to be logged in.
2. Your account can LIKE posts.
3. Getting all of your likes from IG can be a pain.

As an active IG user, I want to be able to download only posts I've liked.

The information of whether or not your logged-in user has liked the target post is available in the API results, but was not available to the end-user for filtering.

This small change allows `user_has_liked` to be used to e.g. download only liked posts of an entire IG account.

Example use:

```
$ gallery-dl --cookies-from-browser FIREFOX--filter 'user_has_liked' https://www.instagram.com/imgur/
```

This will only download the posts that have `has_liked: True` set in the returned REST API data.

Note: it will still need to loop through the entire account's posts since this is done per-post basis instead of looping just the liked posts, but at least you are able to use this IG feature as a download marker.
mikf added a commit that referenced this pull request Jun 7, 2024
@mikf mikf merged commit ece3837 into mikf:master Jun 7, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants