-
Notifications
You must be signed in to change notification settings - Fork 792
/
quickstart.py
37 lines (31 loc) · 1.08 KB
/
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
31
32
33
34
35
36
37
# imports
from instapy import InstaPy
from instapy import smart_run
# login credentials
insta_username = ''
insta_password = ''
comments = ['Nice shot! @{}',
'I love your profile! @{}',
'Your feed is an inspiration :thumbsup:',
'Just incredible :open_mouth:',
'What camera did you use @{}?',
'Love your posts @{}',
'Looks awesome @{}',
'Getting inspired by you @{}',
':raised_hands: Yes!',
'I can feel your passion @{} :muscle:']
# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)
with smart_run(session):
""" Activity flow """
# general settings
session.set_dont_include(["friend1", "friend2", "friend3"])
# activity
session.like_by_tags(["natgeo"], amount=10)
# Joining Engagement Pods
session.set_do_comment(enabled=True, percentage=35)
session.set_comments(comments)
session.join_pods(topic='sports', engagement_mode='no_comments')