AK Python
https://docs.python.org/3.9/whatsnew/3.9.html
Python 3.9 released ( Official documentation )
import requests
from bs4 import BeautifulSoup
headers={
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
}
response=requests.get("Paste your product link",headers=headers)
soup=BeautifulSoup(response.content,'html.parser')
def check_price():
title=soup.find(id="productTitle").get_text()
price=soup.find(id="priceblock_ourprice").get_text().strip()
print("Product name & specs : ",title.strip())
print("Product cost:",price)
check_price()
from bs4 import BeautifulSoup
headers={
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
}
response=requests.get("Paste your product link",headers=headers)
soup=BeautifulSoup(response.content,'html.parser')
def check_price():
title=soup.find(id="productTitle").get_text()
price=soup.find(id="priceblock_ourprice").get_text().strip()
print("Product name & specs : ",title.strip())
print("Product cost:",price)
check_price()
url shortner.gif
13 MB
Url shortner project using python ( Next video👆) Stay tuned❤️
#YKYG
Which one is the first fully supported 64-bit operating system?
Which one is the first fully supported 64-bit operating system?
Anonymous Quiz
22%
Windows vista
32%
Linux
15%
Mac
31%
Windows XP
from tkinter import *
import tkinter.ttk as ttk
from ttkthemes import ThemedTk
from tkinter import messagebox
import pyshorteners
import webbrowser
def logic():
s=pyshorteners.Shortener()
a=s.tinyurl.short("www.google.com")
messagebox.showinfo("This is your URL",a)
def callback():
url="www.google.com"
webbrowser.open_new(url)
top=ThemedTk(theme="scidgrey")
top.title("AK url shortner")
top.geometry("500x500")
filename=PhotoImage(file="A:\Edits\Link.png")
background_label=Label(top,image=filename)
background_label.place(x=0,y=0,relwidth=1,relheight=1)
b1=ttk.Button(top,text="Click to the open the Link",command=callback).pack()
b2=ttk.Button(top,text="Click to shorten the Url",command=logic).pack()
top.mainloop()
import tkinter.ttk as ttk
from ttkthemes import ThemedTk
from tkinter import messagebox
import pyshorteners
import webbrowser
def logic():
s=pyshorteners.Shortener()
a=s.tinyurl.short("www.google.com")
messagebox.showinfo("This is your URL",a)
def callback():
url="www.google.com"
webbrowser.open_new(url)
top=ThemedTk(theme="scidgrey")
top.title("AK url shortner")
top.geometry("500x500")
filename=PhotoImage(file="A:\Edits\Link.png")
background_label=Label(top,image=filename)
background_label.place(x=0,y=0,relwidth=1,relheight=1)
b1=ttk.Button(top,text="Click to the open the Link",command=callback).pack()
b2=ttk.Button(top,text="Click to shorten the Url",command=logic).pack()
top.mainloop()