Instapy: Store User IDs and create blacklist

Created on 19 Oct 2017  路  8Comments  路  Source: timgrossmann/InstaPy

Bountysource

Hi all,

Is there anyway to store on a data base the users that you have interacted with and then create a blacklist so you won't impact them again?

Thanks!

bounty discussion question

Most helpful comment

Thanks @timgrossmann

@converge we don't need to be as evolved as described (yet). A basic blacklist from comments would be sufficient to start working on this improvement and test how it goes!

I think it'd be easier from the user perspective if we could add a "campaign name" and then use it as a blacklist.

Thinking about something like: We are the owners of a restaurant and we want to say "Thank you for visiting us" to anybody who tag their pictures in our location or include our hashtag.
Sometimes someone could do both (in the same picture or in several ones). So, we start by creating a campaign named "myrestaurant1" to like and comment our fans by the hashtag "nameofmyrestaurant"; thereupon we do the same but with our location ID including in the blacklist the users from the campaign "myrestaurant1".

from instapy import InstaPy

insta_username = 'xxx'
insta_password = 'xxx'

session = InstaPy(username=insta_username, password=insta_password)
session.login()

session.set_campaign(name=myrestaurant2)

#Remember  we have run the campaign "myrestaurant1" targeting the hashtag "nameofmyrestaurant" so we will be excluding them and they won't receive the same message two times.

session.set_blacklist(name=myrestaurant1)

session.set_do_comment(True, percentage=100)
session.set_comments(['Thanks for visiting us!'])
session.like_by_locations(['ourlocation ID'], amount=100)

session.end()

All 8 comments

@JCADC can you test it ? #812

@JCADC Could you specify this feature a little bit closer?

I'm not sure to understand the purpose of it.

Do you really want to store every user you liked a picture from to not be interacted again?

@converge Thank you very much!

Thanks @converge, I will try it in the late evening.

Sure, @timgrossmann. Let me ellaborate:

  • We create a function to comment the pictures with the hashtag "cat" and set the percentage = 50. We are commenting only to the 50% of the people there. In the future the number of posts should increase and we might want to target them again. It may be the case that one of the new pictures is from a user that we have previously commented/liked, therefore the bot could be seen as a bot/spam (assuming that we write the same or similar comment).

My point is to store in a data base all the user IDs that you have interacted with in order to blacklist them in the future campaigns and create a funnel to measure the effectiveness of the action. Example:

First comments to "cat". Let's imagine we only have 8 posts and we set percentage=50. The database would look as follows:
User ID - Hashtag - Comment - Interaction (like back, reply/like the comment, start following)
1 - Cat - Nice Cat - None
2 - Cat - Nice Cat - None
3 - Cat - Nice Cat - None
4 - Cat - Nice Cat - Replied
We have other 4 users left.
Effectiveness: 25%

Two weeks later we decide to send a new round and there are 11 posts, therefore 3 new ones: One of them is from a new user (user 9), other is from user 1 (who have never interacted with us) and the last one is from User 4 who replied our comment.

Here comes in the blacklist function: We set percentage = 100 and enable the blacklist. The blacklist ideally could be set for everyone, the ones who never interacted back (or any other condition in a more advanced phase). This time we set it for everyone that received a comment and didn't interact.
The new comment round should impact to:
User ID - Hashtag - Comment - Interaction (like back, reply/like the comment, start following)
1 - Cat - Nice Cat - Replied
2 - Cat - Nice Cat - Follow
3 - Cat - Nice Cat - Replied

5 - Cat - Nice Cat - Replied
6 - Cat - Nice Cat - None
7 - Cat - Nice Cat - Follow
8 - Cat - Nice Cat - None

9 - Cat - Nice Cat - Reply
Effectiveness: 75%

And so on...

Hope it's much clear now!

Thanks :)

@JCADC I really love that people are so interested in this tool, that they suggest features I could've never thought of.... Thank you very much for this!

I really think this could be extremely useful in the future.

However... I also think that it is extremely crucial to describe this feature in the right way for users that might be interested in this or are searching for a similar feature!

Therefore -> Could you help @converge come up with a neat description of what the feature actually does? (Kind of what you did above but in the best case a little bit shorter)

Thank you!

Thanks @timgrossmann

@converge we don't need to be as evolved as described (yet). A basic blacklist from comments would be sufficient to start working on this improvement and test how it goes!

I think it'd be easier from the user perspective if we could add a "campaign name" and then use it as a blacklist.

Thinking about something like: We are the owners of a restaurant and we want to say "Thank you for visiting us" to anybody who tag their pictures in our location or include our hashtag.
Sometimes someone could do both (in the same picture or in several ones). So, we start by creating a campaign named "myrestaurant1" to like and comment our fans by the hashtag "nameofmyrestaurant"; thereupon we do the same but with our location ID including in the blacklist the users from the campaign "myrestaurant1".

from instapy import InstaPy

insta_username = 'xxx'
insta_password = 'xxx'

session = InstaPy(username=insta_username, password=insta_password)
session.login()

session.set_campaign(name=myrestaurant2)

#Remember  we have run the campaign "myrestaurant1" targeting the hashtag "nameofmyrestaurant" so we will be excluding them and they won't receive the same message two times.

session.set_blacklist(name=myrestaurant1)

session.set_do_comment(True, percentage=100)
session.set_comments(['Thanks for visiting us!'])
session.like_by_locations(['ourlocation ID'], amount=100)

session.end()

This is a feature that would be definitely very helpful!

It's ready and merged #812

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Naramsim picture Naramsim  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments

wyvers picture wyvers  路  3Comments

converge picture converge  路  3Comments

neomh picture neomh  路  3Comments