forked from InstaPy/InstaPy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
quickstart.py
30 lines (24 loc) · 946 Bytes
/
quickstart.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from instapy import InstaPy
insta_username = ''
insta_password = ''
# set headless_browser=True if you want to run InstaPy on a server
try:
# set these if you're locating the library in the /usr/lib/pythonX.X/ directory
# Settings.database_location = '/path/to/instapy.db'
# Settings.browser_location = '/path/to/chromedriver'
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False,
multi_logs=True)
session.login()
# settings
session.set_upper_follower_count(limit=2500)
session.set_do_comment(True, percentage=10)
session.set_comments(['aMEIzing!', 'So much fun!!', 'Nicey!'])
session.set_dont_include(['friend1', 'friend2', 'friend3'])
session.set_dont_like(['pizza', 'girl'])
# actions
session.like_by_tags(['natgeo'], amount=1)
finally:
# end the bot session
session.end()