'Difficulty to like media (by id) with igramscraper in python
I'm trying give LIKE in some media with igramscraper (python), but I cannot do it. When I try to use instagram.like() I'm receiving the error: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
One curiousity: if I do "log in" before search medias, my variable "medias" return empty. So, I do "log in" after running variable "medias".
Follow my code below:
from igramscraper.instagram import Instagram
instagram = Instagram()
medias = instagram.get_medias_by_tag(tag='investments', count=20)
instagram.with_credentials('<my_account>', '<my_password>')
instagram.login()
for media in medias:
print(media.identifier) #only to see the media that will be liked
instagram.like(media_id=media.identifier) #here, we have the error that I said above
I hope "to like" each media (by id) with the loop for.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
