File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Instagram Profile Pic Downloader Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 1- #use the following command to install instaloader
2- #pip3 install instaloader
1+ # It will download image in hd
32
4- import instaloader
5- username = str (input ('Enter username: ' ))
6- x = instaloader .Instaloader ()
7- print (x .download_profile (username , profile_pic_only = True ))
3+ import requests
4+ from bs4 import BeautifulSoup as soup
5+
6+
7+ if __name__ == '__main__' :
8+ uname = str (input ("Enter the username : " ))
9+ new = requests .get ('https://www.instadp.com/fullsize/{}' .format (uname ))
10+ imgsoup = soup (new .content ,'lxml' )
11+ imglink = imgsoup .find ('img' ,{'class' :'picture' })['src' ]
12+ imgfind = requests .get (imglink )
13+ photo = open ('photo.png' ,'wb' )
14+ photo .write (imgfind .content )
15+ photo .close ()
16+
You can’t perform that action at this time.
0 commit comments