mirror of
https://github.com/etienne-hd/lbc.git
synced 2026-01-05 00:22:57 +01:00
added 'Sec-Fetch-*' headers to prevent 403 error
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
# lbc
|
||||
publish.sh
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
## v1.0.0
|
||||
## 1.0.0
|
||||
* Initial release
|
||||
@@ -42,7 +42,7 @@ pip install lbc
|
||||
|
||||
## Usage
|
||||
### Client
|
||||
To create client you need to use lbc.Client class
|
||||
To create client you need to use `lbc.Client` class
|
||||
```python
|
||||
import lbc
|
||||
|
||||
|
||||
@@ -22,6 +22,14 @@ class Session:
|
||||
impersonate="firefox",
|
||||
)
|
||||
|
||||
session.headers.update(
|
||||
{
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-site',
|
||||
}
|
||||
)
|
||||
|
||||
if proxy:
|
||||
session.proxies = {
|
||||
"http": proxy.url,
|
||||
|
||||
Reference in New Issue
Block a user