Skip to content

Commit 57df100

Browse files
committed
Make API Installable
1 parent 80d54b3 commit 57df100

6 files changed

Lines changed: 12 additions & 9 deletions

File tree

examples/get_all_comments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import time
33
from datetime import datetime
44

5-
username = ''
6-
pwd = ''
5+
username = 'xiscugarcia'
6+
pwd = 'xisquet'
77
media_id = '1477006830906870775_19343908'
88

99
#stop conditions, the script will end when first of them will be true
@@ -13,7 +13,7 @@
1313

1414
API = InstagramAPI(username,pwd)
1515
API.login()
16-
16+
API.getUsernameInfo()
1717
has_more_comments = True
1818
max_id = ''
1919
comments = []

examples/user_followings.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22
import time
33
from datetime import datetime
44

5-
username = ''
6-
pwd = ''
7-
user_id = '19343908'
5+
username = 'xiscugarcia'
6+
pwd = 'xisquet'
7+
username = 'Bowmacntmj5617'
8+
pwd = 'Zzrk9qzlrR'
89

910

1011
API = InstagramAPI(username,pwd)
1112
API.login()
12-
13+
user_id = '200361318'
14+
API.getUsernameInfo(user_id)
15+
API.LastJson
1316
following = []
1417
next_max_id = True
1518
while next_max_id:
1619
print next_max_id
1720
#first iteration hack
1821
if next_max_id == True: next_max_id=''
19-
_ = API.getUserFollowings(user_id,maxid=next_max_id)
22+
_ = API.getUserFollowers(user_id,maxid=next_max_id)
2023
following.extend ( API.LastJson.get('users',[]))
2124
next_max_id = API.LastJson.get('next_max_id','')
2225

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from InstagramAPI import InstagramAPI
77

8-
InstagramAPI = InstagramAPI("login", "password")
8+
InstagramAPI = InstagramAPI("xiscugarcia", "xisquet")
99
InstagramAPI.login() # login
1010
InstagramAPI.tagFeed("cat") # get media list by tag #cat
1111
media_id = InstagramAPI.LastJson # last response JSON

0 commit comments

Comments
 (0)