Instapy: Followed ReadMe Clarifai Instruction, but InstaPy not Commenting

Created on 10 Nov 2017  路  2Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

When Clarifai does NOT find specified object in image use random comment from list. When Clarifai does find specified object in image use random comment from Clarifai list.

Current Behavior

No images are liked.

InstaPy configuration

```python
from instapy import InstaPy
from instapy import text_user

insta_username = 'username'
insta_password = 'password'

try:

if you want to run this script on a server,

simply add nogui=True to the InstaPy() constructor

session = InstaPy(username=insta_username, password=insta_password, use_firefox=True, page_delay=25)
session.login()

set up all the settings

session.set_upper_follower_count(limit=3500)


session.set_dont_include(['account'])
session.set_dont_like(['sex', 'nsfw', 'gun', 'knife'])
session.like_by_tags(['#1','#2','#3','#4','#5'], amount=110) \

session.set_do_comment(True, percentage=20)
session.set_comments([u':clapping_hands: :clapping_hands:', u':thumbs_up:', 'Sweet!'], media='Photo')

session.set_use_clarifai(enabled=True, api_key='api_key')
session.clarifai_check_img_for(['snow', 'mountain'], comment=True, comments=[u':snowflake: :snow-capped_mountain:!', u'Bring on the :snowflake:!', u'More :snowflake:!', u':snow-capped_mountain: love!', u':snow-capped_mountain: :red_heart:'])

end the bot session

session.end()

send text on success of bot

text_user.text_msg(enabled=True, body="InstaPy completed successfully")

send text on error of bot

except Exception as err:
print('Error running InstaPy: {}'.format(err))
text_user.text_msg(enabled=True, body="InstaPy crahsed")

````

summary from session;
Liked: 463
Already Liked: 1
Inappropriate: 75
Commented: 0
Followed: 0

Did I miss something?

help wanted question

All 2 comments

@gitpatrickhub Please always use the set_... methods BEFORE all of the like_by_..., follow_user_... and interact_by_....

The Setup has to be done before the actual execution of the actions.

=>

# set up
session.set_dont_include(['account'])
session.set_dont_like(['sex', 'nsfw', 'gun', 'knife'])
session.set_do_comment(True, percentage=20)
session.set_comments([u':clapping_hands: :clapping_hands:', u':thumbs_up:', 'Sweet!'], media='Photo')
session.set_use_clarifai(enabled=True, api_key='api_key')
session.clarifai_check_img_for(['snow', 'mountain'], comment=True, comments=[u':snowflake: :snow-capped_mountain:!', u'Bring on the :snowflake:!', u'More :snowflake:!', u':snow-capped_mountain: love!', u':snow-capped_mountain: :red_heart:'])

# execution
session.like_by_tags(['#1','#2','#3','#4','#5'], amount=110) \

@timgrossmann thanks! Sorry, should have caught that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ingorichter picture ingorichter  路  3Comments

seuraltimez picture seuraltimez  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments

tibor picture tibor  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments