mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-27 14:01:09 +00:00
Create dppage.py
This commit is contained in:
parent
426b1a0de6
commit
7f90ae442e
24
InstadpShower/dppage.py
Normal file
24
InstadpShower/dppage.py
Normal 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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user