A
A
Alexander Katunin2022-02-08 19:43:39
Python
Alexander Katunin, 2022-02-08 19:43:39

Error -105 selenium python. How to decide?

I make a request to the page , after loading the page I get the error:

[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


source code:

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()


What am I doing wrong? Tell me, please, what is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2022-02-17
@Sat0shi

It seems to me that the problem is not in selenium, but in your network settings, change DNS to opendns. And judging by the r in executable_path=r, is this an example for python 2.7? This python branch has been out of support for 2 years

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question