Merge pull request #4 from Psychiquest/master

Added Instagramm-dp-shower
This commit is contained in:
Kaushlendra Pratap 2018-10-03 11:38:56 +05:30 committed by GitHub
commit 9a1a19707d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

16
InstadpShower/README.md Normal file
View File

@ -0,0 +1,16 @@
# InstadpShower
This is a simple python script which uses web scraping techniques to display the instagram dp of any user just by typing its username.
To use this script, you need to have bs4 and requests libraries of python installed in your local machine.
To install bs4 and requests, use the following command
```
pip install bs4
```
```
pip install requests
```
Once libraries are installed, just run the script and type the instagram username of the person, whom you want to see the dp of, and the instagram dp will be displayed on the browser.

24
InstadpShower/dppage.py Normal file
View File

@ -0,0 +1,24 @@
from bs4 import BeautifulSoup
import requests
import webbrowser as wb
username = input("Enter the instagram user-id: ")
try:
a = requests.get("https://www.instagram.com/"+username)
co = a.content
soup = BeautifulSoup(co,'html.parser')
link = soup.find_all('meta' , property="og:image")
print(link)
print(type(soup))
imagelink=(str(link[0])[15:])
imagelink=imagelink[:len(imagelink)-23]
print(imagelink)
wb.open_new_tab(imagelink)
except :
print("No such username exists")