Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use selenium to simulate the operation of the website in python

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Python how to use selenium simulation user operation website, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this can learn, I hope you can harvest.

'chromedriver' executable needs to be in Path

Statement: I am new, just learned python soon to record my own pit, sent out if it can help some people solve the problem as soon as possible, that is excellent,( ̄ <$ ̄)"

When crawling Taobao commodity information, I encountered this problem when using selenium to simulate browser crawling:

selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

Details are shown below:

This error is because chromedriver is not configured well, how to configure it? I use chrome.

1. Open chrome and type "chrome://version/" to view chrome version as shown in Figure 63.

2. Visit this website http://chromedriver.storage.googleapis.com/index.html and select the appropriate driver version

such as

Click notes.txt to see the corresponding version number, as follows:

(The exact path depends on where you download and save it.)

4. At this time, the basic operation can be successful!

Unfortunately, the driver version I downloaded the first time was wrong, so I threw the following error ConnectionResetError: The host forced an existing connection to close

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report