Closed rogersillyface closed 10 months ago
Hey @rogersillyface, sorry for the delay. InstaPy2 is not a 1:1 copy of InstaPy meaning any template from their quickstart
folder likely won't work. I don't know the usage stats of my tool but if enough people want I'll spend some time to make working quickstart examples.
Hey @official-antique ! Yeah I ralised that, I did try a while ago (and again after reading that somebody had used an old script).
The script in the documentation, which is what i was referencing at the begining with the line one issue, doesn't appear to work either. I don't know what i could have done wrong.
For reference it is thus script:
from instapy2 import InstaPy2 from instapy2.types import CommentType
session = InstaPy2()
session.login(username='', password='')
pk = session.configuration.location.get_pk(query='place name here')
session.configuration.comments.set_enabled(enable=True)
session.configuration.comments.set_comments(comments=[ 'wow', # this is a normal comment 'wow :thumbsup:', # this is a comment with an emoji 'wow {}', # this is a comment tagging the user ])
session.configuration.comments.set_percentage(percentage=100)
session.comment(amount=10, iterable=[pk], type=CommentType.Locations)
Again, for reference, the error is:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/instapy2/Instapy2-Comments.py", line 1, in
Thanks very much for getting this off the ground!
Hey @official-antique,
Stupid question.. The Quickstart references LoggerConstants here in Terminal:
.utilities import LoggerConstants, Utility
BUt there is no file called LoggerConstants?
Just something I noticed and thought I'd ask.
EDIT: No rush.
Hey There,
I'm trying to use an old Instapy qucikstart file for likes and trie to combine it with the sole qiuickstart guide in the documentation.
It spits back this:
ImportError: attempted relative import with no known parent package
It looks like theres an issue with the first llne of the instapy file.. but I haven't touched that so no idea what the issue could be.
Quickstart (edited):
from instapy2 import InstaPy2 from instapy2.types import CommentType
create a new session
session = InstaPy2()
login to your account
session.login(username='', password='')
enables commenting
session.configuration.comments.set_enabled(enable=False)
set the list of comments to use
session.configuration.comments.set_comments(comments=[ 'wow', # this is a normal comment 'wow :thumbsup:', # this is a comment with an emoji 'wow {}', # this is a comment tagging the user ])
0-100, higher means higher change of commenting (per media)
session.configuration.comments.set_percentage(percentage=55)
this will comment on 10 media from the pk above
session.comment(amount=10, iterable=[pk], type=CommentType.Locations)
let's go! :>
with smart_run(session):
settings