Comments (2)
Possible Solution
Removing the ", _" from "media_pk, _ = media_id.split("") " solves the issue.
*Github hides the underscore
from instagrapi.
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)
- [BUG] instagram suspends the account even after paid proxy use HOT 1
- add can_support_threading for chronological order comment
- Collections
- [bug] [user_followers_v1_chunk] Is instagram sabotaging api requests?
- Status 201: JSONDecodeError in public_request HOT 9
- [BUG] user_following() returns Status 404
- Home feed from Client()
- [BUG] JSONDecodeError in public_request when accessing followers HOT 1
- Error unsupported operand type(s) for //: 'str' and 'int' in send direct message for all options HOT 6
- Change location HOT 1
- Question
- [BUG] user agent cannot be modified to conform to configured terminal HOT 4
- [BUG] HTTPError: 400 Client Error: Bad Request and UnknownError: Denied in DEFCON mode HOT 3
- add music to photo_upload_to_story function
- [BUG] is_paid_partnership field not being used when creating Story through photo_upload_to_story HOT 9
- 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/two_factor_login/ HOT 2
- [BUG] How should the "PleaseWaitFewMinutes" exception be handled?
- [not related to instagrapi bugs] ssl unpinning on android HOT 1
- is_paid_partnership error [BUG] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagrapi.