INFO [2018-04-22 17:05:05] [user] Session started - 2018-04-22 17:05:05
WARNING [2018-04-22 17:05:05] [user] Sorry, Record Activity is not working on Windows. We're working to fix this soon!
INFO [2018-04-22 17:05:36] [user] Logged in successfully!
INFO [2018-04-22 17:05:38] [user] Tag [1/11]
INFO [2018-04-22 17:05:38] [user] --> b'TAG1'
INFO [2018-04-22 17:05:46] [user] [1/6]
INFO [2018-04-22 17:05:46] [user] https://www.instagram.com/p/Bh3fXDngfE4/?tagged=TAG1
INFO [2018-04-22 17:05:50] [user] Image from: b'Example'
INFO [2018-04-22 17:05:55] [user] Number of Followers: 6319
INFO [2018-04-22 17:05:55] [user] Link: b'https://www.instagram.com/p/Bh3fXDngfE4/?tagged=TAG1'
INFO [2018-04-22 17:05:55] [user] Description: b'Example'
INFO [2018-04-22 17:05:57] [user] --> Image Liked!
INFO [2018-04-22 17:06:00] [user] --> Not commented
INFO [2018-04-22 17:06:03] [user] --> Now following
INFO [2018-04-22 17:06:06] [user] [2/6]
INFO [2018-04-22 17:06:06] [user] https://www.instagram.com/p/Bh3fMa1gbZw/?tagged=TAG1
INFO [2018-04-22 17:06:09] [user] Image from: b'Example'
INFO [2018-04-22 17:06:14] [user] Number of Followers: 5169
INFO [2018-04-22 17:06:14] [user] Link: b'https://www.instagram.com/p/Bh3fMa1gbZw/?tagged=TAG1'
INFO [2018-04-22 17:06:14] [user] Description: b'Example'
INFO [2018-04-22 17:06:16] [user] --> Image Liked!
INFO [2018-04-22 17:06:18] [user] --> Not commented
INFO [2018-04-22 17:06:21] [user] --> Now following
INFO [2018-04-22 17:06:25] [user] [3/6]
INFO [2018-04-22 17:06:25] [user] https://www.instagram.com/p/Bh3fMBcl_ZJ/?tagged=TAG1
INFO [2018-04-22 17:06:28] [user] Image from: b'Example'
INFO [2018-04-22 17:06:33] [user] Number of Followers: 115
INFO [2018-04-22 17:06:33] [user] Link: b'https://www.instagram.com/p/Bh3fMBcl_ZJ/?tagged=TAG1'
INFO [2018-04-22 17:06:33] [user] Description: b'Example'
INFO [2018-04-22 17:06:35] [user] --> Image Liked!
INFO [2018-04-22 17:06:37] [user] --> Not commented
INFO [2018-04-22 17:06:40] [user] --> Now following
This is the result for the same script i run but at my home in windows 10.
INFO [2018-04-22 17:56:33] [user] Session started - 2018-04-22 17:56:33
INFO [2018-04-22 17:57:01] [user] Logged in successfully!
INFO [2018-04-22 17:57:02] [user] Tag [1/11]
INFO [2018-04-22 17:57:02] [user] --> b'TAG1'
ERROR [2018-04-22 17:57:33] [user] Too few images, skipping this tag
INFO [2018-04-22 17:57:33] [user] Tag [2/11]
INFO [2018-04-22 17:57:33] [user] --> b'TAG2'
ERROR [2018-04-22 17:58:02] [user] Too few images, skipping this tag
INFO [2018-04-22 17:58:02] [user] Tag [3/11]
INFO [2018-04-22 17:58:02] [user] --> b'TAG3'
This happened when run at Digitalocean Ubuntu 16.04.
The script RUN, but it always skip. It's IP softban? Or Bugs? Please anyone facing the same issue?.
import logging, threading, time, json, datetime, random, sys, os
from tempfile import gettempdir
from selenium.common.exceptions import NoSuchElementException
from instapy import InstaPy
from configparser import SafeConfigParser
from pprint import pprint
#Login Instagram : Username & Password
insta_username = 'USERNAME'
insta_password = 'PASSWORD'
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True,
multi_logs=True)
try:
session.login()
###########
# Setting #
###########
# Set AutoFollow 75%~85% From Liked Media,
# Only Follow once if already unfollow user
session.set_do_follow(enabled=True, percentage=random.randint(75,85), times=1)
# Set Limit for every user to Like Media or Follow
session.set_upper_follower_count(limit = 9889)
session.set_lower_follower_count(limit = 100)
###########
# Action #
###########
# LIKE & FOLLOW
# Target by TAG
targetTAG = []
with open('resources/targetTAG.txt') as f:
for line in f:
targetTAG.append(line.strip("\n").replace('#',''))
random.shuffle(targetTAG)
session.like_by_tags(targetTAG, amount=random.randint(3,7), media=None)
except Exception as exc:
# if changes to IG layout, upload the file to help us locate the change
if isinstance(exc, NoSuchElementException):
file_path = os.path.join(gettempdir(), '{}.html'.format(time.strftime('%Y%m%d-%H%M%S')))
with open(file_path, 'wb') as fp:
fp.write(session.browser.page_source.encode('utf8'))
print('{0}\nIf raising an issue, please also upload the file located at:\n{1}\n{0}'.format(
'*' * 70, file_path))
# full stacktrace when raising Github issue
raise
finally:
# end the bot session
session.end()
I have this problem too.
Is it a new user ? is the tag page contain "top posts" ?
@sionking
The situation is, im using the same script at Windows & Ubuntu.
When run at windows (HOME IP), all working fine.
This is just happened when run at DO Ubuntu (after 2 days run this script with cron enable)
My script will do:
Like 15 ~ 20 per hour
Follow 75% ~ 85% only from like media
& Follow User Follower 15~30 per hour.
This 3 action will execute every hour. Normally will finish after run 15min ~ 25min (base on random pick).
So with CRON enable, script will run every hours (NOT 24/7), just run at specific hours base on my country working hours only.
Thats all.
UPDATE!
Today im checking general.log at Ubuntu server, all working fine.
I not change anything. It just work back like normal run at windows (my home IP).
What about you @gabrielgene
So i will let it run until end of week. Let see what will happened.
I think that my problem is about using authenticated proxy in the browser driver, i will try to put a haproxy to proxy to my authenticated proxy and i feedback it here.
Closing this issue since new update run without this error anymore.
Tested & verified for new update 2 weeks.
same error in last version while using Authenticate Proxy ...
I have this error to
This is a error on headless browser, that don't know how to authenticate, to solve this use a haproxy, instapy -> haproxy -> your proxy.
same here when using Authentication proxy
@gabrielgene what you mean of instapy -> haproxy -> your proxy. and you tell detail ?
@Mehran there is a bug in the browser when using authenticated proxy, to solve this I used an unauthenticated proxy (haproxy) making the browser use haproxy and authenticating itself on its proxy server.
Most helpful comment
I have this problem too.