Hello!
I'm currently trying to run InstaPy on a server at DigitalOcean. I was able to make it work for a couple of hours, but now I get a problem.
Well, the code seems to work perfect, but when I check to see if the images are actually being like I see on instagram that none of them is being liked. What it does is only following and unfollowing users.
Here is the quickstart.py file.
I'm running on Ubuntu 16.04.4
import os
import time
from tempfile import gettempdir
from selenium.common.exceptions import NoSuchElementException
from instapy import InstaPy
from random import sample
insta_username = '*****'
insta_password = '*****'
tags = ['portrait', 'drone', 'travel', 'gopro', 'adventure', 'beautifuldestinations', 'adventurelife', 'nakedplanet', 'exploretocreate', 'earthdiary', 'welltravelled', 'adventurer', 'doyoutravel', 'photooftheday', 'keepitwild', 'exploremore', 'worldtravelbook', 'justgoshoot', 'adventurelife', 'earthclub', 'welivetoexplorer', 'beautifuldestinationss', 'welivetoexplore', 'adventurlifestyle', 'nakedplanetearth', 'samkolder', 'vscocam', 'queekygrams', 'createexplore', 'killeverygram', 'heatercentral', 'fatalframes', 'adventurelife', 'adventurer','visualsofearth', 'chasingemotions', 'exklusive_shot', 'cleancaptures', 'earthclub', 'worldtravelbook', 'passionpassport', 'welltravelled','planetearth','visualsoflife','earthdiary','queekygrams','worldbestgram','earthoutdoors','passionpassport','justgoshoot','adventurelife']
while True:
print('We started!')
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True)
session.login()
# settings
session.set_relationship_bounds(enabled=True,
delimit_by_numbers=True,
max_followers=3000,
min_followers=60,
min_following=30,
max_following=2000)
session.set_do_comment(True, percentage=25)
session.set_dont_like(['boobs', 'tits', 'gym', 'couple','pussy'])
session.set_do_follow(enabled=True, percentage=75,times=1)
session.set_do_like(enabled=True, percentage=85)
session.set_user_interact(amount=3, randomize=False, percentage=50)
# actions
session.unfollow_users(amount=100, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=100)
session.set_comments([ u'Love this! Have a great day! :fire:' , u'Great shot! Keep on going! :fire: :heart_eyes:' , u'Great shot! Have a nice day! :fire: :fire:' , u'Nice one! Have a fantastic day! :fire:' ])
session.set_smart_hashtags(sample(tags, 3), limit=3 , sort='random' , log_tags=True)
session.like_by_tags(amount=25, use_smart_hashtags=True)
session.unfollow_users(amount=70, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=15*60)
session.like_by_tags(sample(tags, 3), amount=20, media='Photo')
session.follow_likers (['nainoalanger','sam_kolder', 'jacob','amirzakeri', 'iwwm', 'thatoneblondkid', 'robstrok', 'valdays','visualrev'], photos_grab_amount = 2, follow_likers_per_photo = 3, randomize=True, sleep_delay=600, interact=True)
session.set_comments([ u'Love this! Have a great day! :fire:' , u'Great shot! Keep on going! :fire: :heart_eyes:' , u'Great shot! Have a nice day! :fire: :fire:' , u'Nice one! Have a fantastic day! :fire:' ])
session.interact_user_followers(['zebdos', 'nainoalanger','sam_kolder', 'jacob','amirzakeri', 'iwwm', 'thatoneblondkid', 'robstrok', 'valdays','visualrev'], amount=22, randomize=True)
session.unfollow_users(amount=60, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=900)
session.set_smart_hashtags(sample(tags, 3), limit=3 , sort='top' , log_tags=True)
session.like_by_tags(amount=25, use_smart_hashtags=True)
session.unfollow_users(amount=50, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=1200)
session.like_by_tags(['travel', 'adventure'], amount=16)
session.unfollow_users(amount=50, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=1400)
session.set_smart_hashtags(sample(tags, 3), limit=3 , sort='top' , log_tags=True)
session.like_by_tags(amount=20, use_smart_hashtags=True)
session.unfollow_users(amount=40, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=300)
session.like_by_tags(sample(tags, 3), amount=20)
session.follow_commenters(['nainoalanger','sam_kolder', 'jacob','amirzakeri', 'iwwm', 'thatoneblondkid', 'robstrok', 'valdays','visualrev'], amount=15, daysold=100, max_pic = 10, sleep_delay=600, interact=True)
session.set_smart_hashtags(['beautifuldestinations','exploretocreate'], limit=3, sort='random', log_tags=True)
session.like_by_tags(amount=10, use_smart_hashtags=True)
session.unfollow_users(amount=50, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=3600)
session.unfollow_users(amount=40, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=3600)
session.like_by_tags(['photography', 'camera', 'portrait', 'landscape'], amount=15)
session.like_by_tags(['travel', 'planetearth', 'adventurelife', 'doyoutravel'], amount=15)
session.unfollow_users(amount=60, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=1200)
session.interact_user_followers(['zebdos', 'nainoalanger','sam_kolder', 'jacob','amirzakeri', 'iwwm', 'thatoneblondkid', 'robstrok', 'valdays','visualrev'], amount=15, randomize=True)
session.unfollow_users(amount=40, InstapyFollowed=(True, 'all'), style='FIFO', unfollow_after=24*60*60, sleep_delay=1000)
session.follow_likers (['nainoalanger','sam_kolder', 'jacob','amirzakeri', 'iwwm', 'thatoneblondkid', 'robstrok', 'valdays','visualrev'], photos_grab_amount = 2, follow_likers_per_photo = 3, randomize=True, sleep_delay=600, interact=True)
session.end()
This looks like a ban from IG to DO's ips
Do you actually think so?
My account seems to work fine cause I can like pics and follow people. With the DO server the only problem comes when liking and commenting pics. The code doesn't show any error and seems to work fine but in reality it doesn't like and comment on pics but only follows users.
dont DO
Why @sionking ?
I don't think It's because of DO, I assume your account is temporarily blocked by instagram since the bot liked too many tags.
But I can still like pics from my phone and it works @imkimchi
proxy and DO will get you like blocked very fast.
@sionking what is the point on using proxy then? don't you need to set up proxy when you run multiple accounts?
@sionking I don't remember how many times we had such conversation. I wish there is a way to pin the issue in the issue list on Github. but, might be worth to write something up in the Wiki page.
I have two accounts on DO, one is working with auto liking the other is not. I see no errors it just doesn't like the photos when I check on Instagram.
@eversionsystems mostly temporarily blocked
I can confirm it's temporary blocked. Even if you don't see it when you open the account on your phone. I noticed that on DO instapy goes very fast, I suggest you to put some big delays throughout the code and also between likes.
Thanks for the confirmation guys. Any idea how long the block lasts?
24 hours dude
@gapansi how do you add delays between likes? I don't think there's any feature for delay from instapy
@imkimchi
https://github.com/timgrossmann/InstaPy/blob/master/instapy/instapy.py#L86
manually change this value. default 25second
thanks brah much love