Answer the question
In order to leave comments, you need to log in
How to parse price in dns?
I can’t parse, I climbed the sites everything looks easy: you write a tag and the class is all there, but no
from colorama import init, Fore, Back, Style
from bs4 import BeautifulSoup
import requests as r
init()
def dns_and_sitiling ():
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...... (......) ......'}
dns_2060_msi = 'https://www.dns-shop.ru/product/cac7f3918df62ff0/videokarta-msi-geforce-rtx-2060-ventus-gp-oc-rtx-2060-ventus-gp-oc/'
full_page_dns = r.get(dns_2060_msi, headers=headers)
soup_dns = BeautifulSoup(full_page_dns.content, 'html.parser')
parsing_dns = soup_dns.findall('div', {'class': 'product-buy__price'})
print(full_page_dns)
dns_and_sitiling()
Answer the question
In order to leave comments, you need to log in
DNS has dynamic content loading. The options are to get deeper into the structure of the site, learn how to parse its internal api, or use something like selenium
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question