-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.py
34 lines (32 loc) · 881 Bytes
/
app.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
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 12 18:17:16 2018
@author: strix
"""
import csv
import instaloader
YOUR_USER_NAME="#########"
YOUR_PASSWORD="#########"
TARGET_USERNAME="#########"
L = instaloader.Instaloader()
L.login(YOUR_USER_NAME, YOUR_PASSWORD) # (login)
profile = instaloader.Profile.from_username(L.context,TARGET_USERNAME)
mylist=[]
i=0
for followee in profile.get_followees():
#user=[]
i+=1
#user.append(followee.biography)
#user.append(followee.username)
#user.append(followee.userid)
#user.append(followee.full_name)
#user.append(followee.followers)
#user.append(followee.followees)
#mylist.append(user)
bio=followee.biography
mylist.append(bio)
print(i)
print(bio)
with open("{}.csv".format(TARGET_USERNAME), 'w',encoding="utf-8") as myfile:
wr = csv.writer(myfile)
wr.writerow(mylist)