Request for scrapy to initiate browser fingerprinting
Project description
scrapy-fingerprint
2023/11/07 scrapy-fingerprint==1.0
- fix : This allows the entire suite of downloader functionality to function
Description
Scrapy - fingerprint is based on [curl_cffi] (https://github.com/yifeikong/curl_cffi), which is used in the packaging of scrapy TLS or JA3 fingerprints of simulated browser requests
github:https://github.com/tieyongjie/scrapy-fingerprint
Installation
pip install scrapy_fingerprint
Usage
After creating the scrapy project, add the proxy by adding the following configuration in settings.py
# proxy 链接配置
PROXY_HOST = 'http-dynamic-S02.xiaoxiangdaili.com'
PROXY_PORT = 10030
PROXY_USER = '******'
PROXY_PASS = '******'
And you also need to enable download handler in DOWNLOAD_HANDLERS
in settings.py
DOWNLOAD_HANDLERS = {
'http': ('scrapy_fingerprint.fingerprint_download_handler.'
'FingerprintDownloadHandler'),
'https': ('scrapy_fingerprint.fingerprint_download_handler.'
'FingerprintDownloadHandler'),
}
You can use scrapy.Request to make a request with a browser fingerprint
import scrapy
yield scrapy.Request(url=url, callback=self.parse)
You can also add impersonate in FingerprintRequest
import scrapy
yield scrapy.Request(url, callback=self.parse, meta={"impersonate": "chrome107"})
impersonate defaults to random browser fingerprints
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scrapy_fingerprint-1.0.tar.gz
.
File metadata
- Download URL: scrapy_fingerprint-1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/6.0.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59c7bf2b14d47e02f6a442f258d2c9d277f6c35ebb1fbd2e35d1756f0c45eb52 |
|
MD5 | f3f355c798dcca60d1de0954059c5366 |
|
BLAKE2b-256 | e651adc1f1dde0cb34e1b7b6122e972bca5a1fe796df49e13d445205bfdaa7aa |
File details
Details for the file scrapy_fingerprint-1.0-py3-none-any.whl
.
File metadata
- Download URL: scrapy_fingerprint-1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/6.0.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bbce7face8d3978f3e8b67f2587af92d3941a23894f27199d59e55b4e9bba2f |
|
MD5 | 7ebf6cc2c45a6261b5174986adcf6115 |
|
BLAKE2b-256 | 0eb78fce3ea9d868dfd4046f81c94647b5cea7ab97762705c0b2abf4c630349f |