File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 22import time
33from datetime import datetime
44
5- username = ''
6- pwd = ''
5+ username = 'xiscugarcia '
6+ pwd = 'xisquet '
77media_id = '1477006830906870775_19343908'
88
99#stop conditions, the script will end when first of them will be true
1313
1414API = InstagramAPI (username ,pwd )
1515API .login ()
16-
16+ API . getUsernameInfo ()
1717has_more_comments = True
1818max_id = ''
1919comments = []
Original file line number Diff line number Diff line change 22import time
33from 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
1011API = InstagramAPI (username ,pwd )
1112API .login ()
12-
13+ user_id = '200361318'
14+ API .getUsernameInfo (user_id )
15+ API .LastJson
1316following = []
1417next_max_id = True
1518while 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
Original file line number Diff line number Diff line change 55
66from InstagramAPI import InstagramAPI
77
8- InstagramAPI = InstagramAPI ("login " , "password " )
8+ InstagramAPI = InstagramAPI ("xiscugarcia " , "xisquet " )
99InstagramAPI .login () # login
1010InstagramAPI .tagFeed ("cat" ) # get media list by tag #cat
1111media_id = InstagramAPI .LastJson # last response JSON
You can’t perform that action at this time.
0 commit comments