Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 33f6f1f

Browse files
Update 2023年07月21日-python-selenium-bypass-cloudflare.md
1 parent 429365e commit 33f6f1f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎_posts/2023-07-21-python-selenium-bypass-cloudflare.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ feature_image: "https://picsum.photos/2560/600?image=872"
1212

1313

1414

15-
Like many websites, Cloudflare also detects access to see if it is initiated by a Selenium bot. This detection mainly focuses on whether there are unique js variables, such as variables containing "selenium" and "webdriver", or file variables containing "$cdc_" and "$wdc_".
15+
Like many websites, Cloudflare also detects access to see if it is initiated by a Selenium bot. This detection mainly focuses on whether there are unique js variables, such as variables containing "selenium" and "webdriver", or file variables containing "$cdc_" and "$wdc_".
1616

17-
The detection mechanism of each driver may be different, the following solutions are mainly for chromedriver.
17+
The detection mechanism of each driver may be different, the following solutions are mainly for chromedriver.
1818

19-
1. Use Undetected-chromedriver This is a very convenient package that can be installed directly through pip. Then initialize the driver like below, after that it works just like regular Selenium usage.
19+
1. Use Undetected-chromedriver This is a very convenient package that can be installed directly through pip. Then initialize the driver like below, after that it works just like regular Selenium usage.
20+
2021
```
2122
python Copy code
2223
@@ -26,7 +27,8 @@ driver.get('https://nowsecure.nl')
2627
2728
```
2829

29-
2. Directly modify the chromedriver executable file You can change the key variable to any character that does not contain "cdc".
30+
2. Directly modify the chromedriver executable file You can change the key variable to any character that does not contain "cdc".
31+
3032
```
3133
javascript Copy code
3234
@@ -53,7 +55,7 @@ function getPageCache(opt_doc, opt_w3c) {
5355
}
5456
```
5557

56-
There is not much difference between these two methods in essence. In fact, undetected-chromedriver will apply a patch when starting chromedriver, completing the steps of modifying the key.
58+
There is not much difference between these two methods in essence. In fact, undetected-chromedriver will apply a patch when starting chromedriver, completing the steps of modifying the key.
5759

5860
```
5961
python Copy code
@@ -76,5 +78,6 @@ def patch_exe(self):
7678
linect += 1
7779
7880
```
79-
3. Using the **ScrapingBypass** API, you can easily [bypass Cloudflare](https://www.scrapingbypass.com) robot verification, even if you need to send 100,000 requests, you don't have to worry about being identified as a scraper.
81+
82+
3. Using the **ScrapingBypass** API, you can easily [bypass Cloudflare](https://www.scrapingbypass.com) robot verification, even if you need to send 100,000 requests, you don't have to worry about being identified as a scraper.
8083
A ScrapingBypass API can break through all anti-anti-bot robot inspections, easily bypass Cloudflare, CAPTCHA verification, WAF, CC protection, and provide HTTP API and Proxy, including interface address, request parameters, return processing; and set Referer, browser UA and headless status and other browser fingerprint device features.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /