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

Is there a way to list the posts I liked? #1990

Open
rockfly830 opened this issue Jul 31, 2024 · 2 comments
Open

Is there a way to list the posts I liked? #1990

rockfly830 opened this issue Jul 31, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rockfly830
Copy link
Contributor

You can like media with Instagrapi, but I can’t find a way to see all the media I’ve liked.

Is there a way to list the posts I liked?

@rockfly830 rockfly830 added the enhancement New feature or request label Jul 31, 2024
@sujay1599
Copy link

I am looking for something similar too so I can go unlike all the stuff as now I'm being flagged as a bot.

@rockfly830
Copy link
Contributor Author

rockfly830 commented Aug 1, 2024

As far as I can tell, this is the only endpoint we use to fetch liked posts: https://www.instagram.com/async/wbloks/fetch/?appid=com.instagram.privacy.activity_center.liked_media_screen&type=app&__bkv.

It looks like the __bkv parameter stays the same for every request.

The issue is with the response object. The endpoint returns what seems to be a description of the likes page.

{
    "bk.components.screen.Wrapper": {
        "content": {
            "bk.components.Flexbox": {
                "flex_direction": "",
                "children": [
                    {},
                    {},
                    {
                        "bk.components.Flexbox": {
                            "children": [
                                {
                                    "bk.components.Flexbox": {
                                        "children": [
                                            {
                                                "bk.components.Collection": {
                                                    "direction": "",
                                                    "children": [
                                                        {
                                                            "bk.components.Flexbox": {
                                                                "flex_direction": "column",
                                                                "justify_content": "center",
                                                                "on_bind": "(bk.action.array.Make,(bk.action.array.Make,(bk.action.i32.Const,2106111818),\"children\", (bk.action.array.Map,(bk.action.array.Make,(bk.action.map.Make,(bk.action.array.Make, \"row_info\", \"margin_bottom\"),(bk.action.array.Make,(bk.action.array.Make,(bk.action.map.Make,(bk.action.array.Make, \"item_info\"),(bk.action.array.Make,(bk.action.array.Make,(bk.action.map.Make,(bk.action.array.Make, \"media_id\", \"media_code\", \"media_product_type\", \"media_type\", \"media_image_url\", \"location_name\", \"icon\", \"margin_right\"),(bk.action.array.Make, \"3424572061128130266_1067259270\", \"C-GhiU7RP7a\", \"clips\", (bk.action.i32.Const, 2), \"https:\\\/\\\/scontent.cdninstagram.com\\\/v\\\/t51.29350-15\\\/453556695_1649886469135392_3213666516857190255_n.jpg?stp=dst-jpg_e0_s240x240&cb=b7820090-4a9c6a6a&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4zODl4Mzg5LnNkci5mMjkzNTAuY292ZXJmcmFtZV9ianBnX2RlZmF1bHQifQ&_nc_ht=scontent.cdninstagram.com&_nc_cat=100&_nc_ohc=ZTMIpK649QEQ7kNvgGOWVOY&gid=2a52a9c9d05e463e9397b03270af9d72&edm=APs17CUBAAAA&ccb=7-5&ig_cache_key=MzQyNDU3MjA2MTEyODEzMDI2Ng\u00253D\u00253D.2-ccb7-5&oh=00_AYBXQLKqt0ep5PYGaI7w8XhVybsF4aeLfVd-BAAIzOeq_w&oe=66B171E3&_nc_sid=10d13b\", \"\", \"reels\", \"2dp\"))",
                                                                "child_templates": [
                                                                    {}
                                                                ],
                                                                "id": 2106111818,
                                                                "_style": {}
                                                            }
                                                        }
                                                    ],
                                                    "id": "2106111721"
                                                }
                                            }
                                        ],
                                        "id": "2106111716",
                                        "_style": {}
                                    }
                                }
                            ],
                            "id": "2106111715",
                            "extensions": [],
                            "_style": {}
                        }
                    }
                ],
                "extensions": [],
                "_style": {}
            }
        }
    }
}

In on_bind has all posts and infos about it. the infos is media_id, media_code, media_product_type, media_type, media_image_url, location_name, icon, margin_right.

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

No branches or pull requests

2 participants