shine-jayakumar / insta-likecom-bot

Automates likes and comments on an instagram account or tag
MIT License
140 stars 30 forks source link

Having trouble commenting some things on only one post #86

Closed TheMaxSt closed 1 year ago

TheMaxSt commented 1 year ago

Im trying to use your code to comment on specific posts (to automatically enter giveaways), for that im using -il (when the post i want to comment on is the last one) and the argument where you match the tags. My issue arrises from the fact that it starts checking every single post, when it finds it, it leaves one comment, and continues on every post until it rans out of them. Then it starts again with the second comment. Im not sure if there is any other argument that i can use for the purpose i already told you. Also, sorry if this doesnt go here, im new to github lol PS: Your code is awesome :D

shine-jayakumar commented 1 year ago

@TheMaxSt The -il, --inlast parameter is used to target posts posted within a specific time ex. in last 1 day, 1 month, etc. Examples - -il 1y, -il 2M, -il 3d, -il 4h, -il 53m, -il 10s. It matches the tags first and then checks if the post falls within the time specified (if inlast param is used). It comments on that post with a random comment from a list of comments you specified. If your comment is going to be the same for all the posts, just use -oc , --onecomment followed by the comment.

Unlike you said, "Then it starts again with the second comment", it never starts all over again for the second comment. It chooses a random comment. It does look through the entire list of posts available for the account unless you specify the number of posts you want to comment on, in which case you can use the -np , --numofposts parameter.

So for your purpose use something like: ilcbot.py -u user -p password -t '#target' -np 10 -il 10h -mt tags.txt -mn 1

This will target posts posted within last 10 hours and has at least 1 tag from the list of tags you specified.