Делаю запрос на
страницу, после загрузки страницы получаю ошибку:
[1660:9260:0208/192458.238:ERROR:socket_manager.cc(128)] Failed to resolve address for stun.services.mozilla.com., errorcode: -105
[1660:9260:0208/192458.238:ERROR:socket_manager.cc(128)] Failed to resolve address for stun.services.mozilla.com., errorcode: -105rorcode: -105
исходный код:
from selenium import webdriver
import random
class SheinParser:
url = "https://ru.shein.com/new/Dress-New-in-15-Days-sc-00205078.html?ici=ru_tab01navbar01menu07dir01&scici=navbar_WomenHomePage~~tab01navbar01menu07dir01~~1_7_1~~itemPicking_00205078~~~~0&srctype=category&userpath=category%3E%D0%9D%D0%9E%D0%92%D0%98%D0%9D%D0%9A%D0%98%3E%D0%9D%D0%9E%D0%92%D0%98%D0%9D%D0%9A%D0%98%20%D0%96%D0%95%D0%9D%D0%A1%D0%9A%D0%9E%D0%99%20%D0%9E%D0%94%D0%95%D0%96%D0%94%D0%AB%3E%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5%20%D0%9F%D0%BB%D0%B0%D1%82%D1%8C%D1%8F"
user_agents = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, например Gecko) Chrome/97.0.4692.99 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 YaBrowser/20.12.2.105 Yowser/2.5 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
]
def __init__(self):
self.options = webdriver.ChromeOptions()
self.options.add_argument(f"user-agent={random.choice(SheinParser.user_agents)}")
#self.options.headless = True
self.driver = webdriver.Chrome(
executable_path=r"D:\python\update\Parser\chromedriver\chromedriver.exe",
options=self.options
)
def sheinpars(self):
try:
self.driver.get(url=SheinParser.url)
except Exception as _ex:
print(_ex)
finally:
self.driver.close()
self.driver.quit()
if __name__ == "__main__":
pas = SheinParser()
pas.sheinpars()
Что я делаю не так? Подскажите, пожалуйста, в чем проблема?