Giter Site home page Giter Site logo

Comments (2)

tajbowness avatar tajbowness commented on May 23, 2024

Possible Solution
Removing the ", _" from "media_pk, _ = media_id.split("") " solves the issue.

*Github hides the underscore

from instagrapi.

tajbowness avatar tajbowness commented on May 23, 2024

For this particular post it had two underscores in the post id 'id': '3307278577288067651_63510424646_mccr40091ae1'

It traditionally only has one underscore. This was a post from the timeline timeline_posts = cl.get_timeline_feed()

Values from posts from the timeline must have a different format because the result of cl.media_info(post["pk"]) gives an id with only one underscore.

Solution:
To get the posts proper or acceptable id, use post_pk = cl.media_info(post["pk"]) then do cl.media_like(post_pk) to not get the ValueError exception.

from instagrapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.