Text/html,application/xhtml+xml,application/xml;q=0


Download 5.39 Kb.
Sana01.03.2023
Hajmi5.39 Kb.
#1241062
Bog'liq
2023-02-18 17-05-49


headers = { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36", "referer": "https://avtoelon.uz/uz/avto/chevrolet/?price-currency=l"
}
def get_page(url):
site = requests.get(url=url, headers=headers) return site if site.status_code == 200 else False
def parser():
print("Parser ishga tushdi !")
html = get_page("https://avtoelon.uz/uz/avto/chevrolet/?page=l")
htmldom = BeautifulSoup(html.text, "Ixml")
print(htmldom.title.text)
if name == " main " :
parser()
Download 5.39 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling