Skip to content

Commit

Permalink
Rolled back cloudscraper to fix captcha v1 solving issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Mar 8, 2024
1 parent 1428edf commit 213a044
Show file tree
Hide file tree
Showing 16 changed files with 676 additions and 1,070 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cloudscraper
Version: 1.2.71
Version: 1.2.58
Summary: A Python module to bypass Cloudflare's anti-bot page.
Home-page: https://github.com/venomous/cloudscraper
Author: VeNoMouS
Expand Down Expand Up @@ -82,6 +82,31 @@ We support the following Javascript interpreters/engines.
- **[Node.js](https://nodejs.org/)**
- **[V8](https://github.com/sony/v8eval/):** We use Sony's [v8eval](https://v8.dev)() python module.

# Updates

Cloudflare modifies their anti-bot protection page occasionally, So far it has changed maybe once per year on average.

If you notice that the anti-bot page has changed, or if this module suddenly stops working, please create a GitHub issue so that I can update the code accordingly.

- Many issues are a result of users not updating to the latest release of this project. Before filing an issue, please run the following command:

```
pip show cloudscraper
```

If the value of the version field is not the latest release, please run the following to update your package:

```
pip install cloudscraper -U
```

If you are still encountering a problem, open an issue and please include:

- The full exception and stack trace.
- The URL of the Cloudflare-protected page which the script does not work on.
- A Pastebin or Gist containing the HTML source of the protected page.
- The version number from `pip show cloudscraper`.

# Usage

The simplest way to use cloudscraper is by calling `create_scraper()`.
Expand All @@ -104,26 +129,6 @@ Consult [Requests' documentation](http://docs.python-requests.org/en/latest/user

## Options

### Disable Cloudflare V1
#### Description

If you don't want to even attempt Cloudflare v1 (Deprecated) solving..

#### Parameters


|Parameter|Value|Default|
|-------------|:-------------:|:-----:|
|disableCloudflareV1|(boolean)|False|

#### Example

```python
scraper = cloudscraper.create_scraper(disableCloudflareV1=True)
```

------

### Brotli

#### Description
Expand Down Expand Up @@ -327,7 +332,6 @@ scraper = cloudscraper.create_scraper(interpreter='nodejs')

- **[2captcha](https://www.2captcha.com/)**
- **[anticaptcha](https://www.anti-captcha.com/)**
- **[CapSolver](https://capsolver.com/)**
- **[CapMonster Cloud](https://capmonster.cloud/)**
- **[deathbycaptcha](https://www.deathbycaptcha.com/)**
- **[9kw](https://www.9kw.eu/)**
Expand Down Expand Up @@ -365,6 +369,7 @@ if proxies are set you can disable sending the proxies to 2captcha by setting `n

```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={
'provider': '2captcha',
'api_key': 'your_2captcha_api_key'
Expand Down Expand Up @@ -392,6 +397,7 @@ if proxies are set you can disable sending the proxies to anticaptcha by setting

```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={
'provider': 'anticaptcha',
'api_key': 'your_anticaptcha_api_key'
Expand All @@ -401,29 +407,6 @@ scraper = cloudscraper.create_scraper(

------

#### CapSolver

##### Required `captcha` Parameters

|Parameter|Value|Required|Default|
|-------------|:-------------:|:-----:|:-----:|
|provider|(string) `captchaai`|yes||
|api_key|(string)|yes||


##### Example

```python
scraper = cloudscraper.create_scraper(
captcha={
'provider': 'capsolver',
'api_key': 'your_captchaai_api_key'
}
)
```

------

#### CapMonster Cloud

##### Required `captcha` Parameters
Expand All @@ -442,6 +425,7 @@ if proxies are set you can disable sending the proxies to CapMonster by setting

```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={
'provider': 'capmonster',
'clientKey': 'your_capmonster_clientKey'
Expand All @@ -465,6 +449,7 @@ scraper = cloudscraper.create_scraper(

```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={
'provider': 'deathbycaptcha',
'username': 'your_deathbycaptcha_username',
Expand All @@ -489,6 +474,7 @@ scraper = cloudscraper.create_scraper(

```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={
'provider': '9kw',
'api_key': 'your_9kw_api_key',
Expand All @@ -512,6 +498,7 @@ Use this if you want the requests response payload without solving the Captcha.
##### Example
```python
scraper = cloudscraper.create_scraper(
interpreter='nodejs',
captcha={'provider': 'return_response'}
)
```
Expand Down Expand Up @@ -637,36 +624,3 @@ print(
)
)
```

### Cryptography

#### Description

Control communication between client and server

#### Parameters

Can be passed as an argument to `create_scraper()`.

|Parameter|Value|Default|
|-------------|:-------------:|:-----:|
|cipherSuite|(string)|None|
|ecdhCurve|(string)|prime256v1|
|server_hostname|(string)|None|

#### Example

```python
# Some servers require the use of a more complex ecdh curve than the default "prime256v1"
# It may can solve handshake failure
scraper = cloudscraper.create_scraper(ecdhCurve='secp384r1')
```

```python
# Manipulate server_hostname
scraper = cloudscraper.create_scraper(server_hostname='www.somesite.com')
scraper.get(
'https://backend.hosting.com/',
headers={'Host': 'www.somesite.com'}
)
```
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
cloudscraper-1.2.71.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
cloudscraper-1.2.71.dist-info/LICENSE,sha256=luC9NJPEX0JAQUKWkzWlAOaaE69fNKnW1uIuDKmWERc,1091
cloudscraper-1.2.71.dist-info/METADATA,sha256=ywzk5ZCEv-I8Y9gajnVCsiAR3DrdmeiRLam3EGTJ0UA,19942
cloudscraper-1.2.71.dist-info/RECORD,,
cloudscraper-1.2.71.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
cloudscraper-1.2.71.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
cloudscraper-1.2.71.dist-info/top_level.txt,sha256=OFEsobVl62sa2NzpgNtfHZkIw_qZr_wljhjmlP9oGiM,13
cloudscraper/__init__.py,sha256=Eg8AqKak2yYcraKqt7O3LJLNmppC2uL7dvAANiyxh5w,15960
cloudscraper/captcha/2captcha.py,sha256=yyDWvL6HVK4pM69aRpOV9mwzbtPC0yGz_mWkQ7-mkmI,10643
cloudscraper/captcha/9kw.py,sha256=5EAUyO_vBEuLKsr4sXYa25MSVOm3BXVAdcenF6ZPsgI,7701
cloudscraper-1.2.58.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
cloudscraper-1.2.58.dist-info/LICENSE,sha256=luC9NJPEX0JAQUKWkzWlAOaaE69fNKnW1uIuDKmWERc,1091
cloudscraper-1.2.58.dist-info/METADATA,sha256=q25vkvMHkAxmuZRwak56i4CLAFUuG5EwEzz1oEXOY3U,19537
cloudscraper-1.2.58.dist-info/RECORD,,
cloudscraper-1.2.58.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
cloudscraper-1.2.58.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
cloudscraper-1.2.58.dist-info/top_level.txt,sha256=OFEsobVl62sa2NzpgNtfHZkIw_qZr_wljhjmlP9oGiM,13
cloudscraper/__init__.py,sha256=gsOMaKAKNfJUR4FkiEefAA2fAHVFuSwkblGgqxClsrw,32790
cloudscraper/captcha/2captcha.py,sha256=CWF62VmLqb_KvSH-dqzo1XEwCBOQh1Aee-G18cX_7aw,10371
cloudscraper/captcha/9kw.py,sha256=1dfhRHKeCx8yIE1opWyQ1Q7aHJlXDdkv1bV2Bfzbrf8,7387
cloudscraper/captcha/__init__.py,sha256=VORxm32xqLrEE-zxFWgEhSbtqfigjCfwodChg1VlQ6c,1511
cloudscraper/captcha/anticaptcha.py,sha256=YUsLviq3ZtbjTUnAPq6zVEieHmeSgnmiXKcqXZeO5qA,6152
cloudscraper/captcha/capmonster.py,sha256=_9AUr6vHG4c5XLc5XqvnnMqgcvuKnzz1ckJpSySjgKQ,6143
cloudscraper/captcha/capsolver.py,sha256=x38fO0m_k2W8nO3IppXADZsfCYl0iyvRgajZ5s5iTSU,6060
cloudscraper/captcha/deathbycaptcha.py,sha256=asUX_quUsjAyWVRc7_8o_ryHZFotN-NP60mQiuN-c1U,8673
cloudscraper/cloudflare.py,sha256=i1jyJcY-aRy3IQ-7YUly8qGUovO4Nx99M_FKfz4eivQ,19993
cloudscraper/captcha/anticaptcha.py,sha256=cK8LON8M-8MN1wx_rSMTTqxrpwbL65Z2svH-LtGiA40,3478
cloudscraper/captcha/capmonster.py,sha256=oVXdv2Wrgh2nWFrYttUzbqW9xZU1j6A4cDDcZINIoVg,5695
cloudscraper/captcha/deathbycaptcha.py,sha256=UJqkh35gcKVdIhwNqF7N_0ixpIPT2PHiMbT378wEM4w,8073
cloudscraper/exceptions.py,sha256=WSMgI8PRvU3g4KDFrjU-42p83lSAVOw8tN2NSqqIUfw,2397
cloudscraper/help.py,sha256=fNYNGFQjiCL1d-gCpDoulBk4iHOuzNhLBudi7NrOHSg,2100
cloudscraper/interpreters/__init__.py,sha256=mWY8LuzDRYWGGnKz5vYSdrOnoVaeWlixmAtZN8Pq6bY,1734
Expand Down
File renamed without changes.
Loading

0 comments on commit 213a044

Please sign in to comment.