/
instabot.py
52 lines (49 loc) · 2.28 KB
/
instabot.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from compare_comments import compare_comments
from self_info import self_info
from get_own_post import get_own_post
from get_user_info import get_user_info
from recent_media_like import recent_media_like
from like_a_post import like_a_post
from post_a_comment import post_a_comment # Importing functions and constants from other files
from delete_negative_comments import delete_negative_comment
from constants import insta_username
from get_user_id import get_user_id
from comment_list import comment_list
from get_users_post import get_users_post
from sub_trends import sub_trends
def menu():
while True:
choice = raw_input(
" 1) To get own info \n 2) To get own post \n 3) To get friends id \n 4) To get friends info \n 5) To Get friend post id \n 6) To Like post \n 7) To comment on post \n "
"8) To Delete negative comments from your post\n 9) To view recent Media id like by You\n 10) To view comment of the your friends post \n 11) To find the Sub-trends of an event\n 12) To compare Pos and Neg comments of your post\n 13) To exit application\n ENTER YOUR CHOICE :- ")
if choice.isdigit() == True:
choice=int(choice)
if choice == 1:
self_info()
elif choice == 2:
print "Post Id : %s \n"% get_own_post()
elif choice == 3:
print "User ID : %s \n" % get_user_id(insta_username)
elif choice == 4:
get_user_info(insta_username) # Calling of get_user_info function
elif choice == 5:
print "Post ID : %s \n"% get_users_post(insta_username)
elif choice == 6:
like_a_post(insta_username) # Calling of like_a_post() function
elif choice == 7:
z post_a_comment(insta_username)
elif choice == 8:
delete_negative_comment()
elif choice == 9:
recent_media_like() # Calling of recent_media_like() function
elif choice == 10:
comment_list()
elif choice == 11:
sub_trends() # Calling of sub_trends() function
elif choice == 12:
compare_comments()
elif choice == 13:
break
else:
print "\n\n[[please choose any one of the option]]"
menu()