mirror of
https://github.com/etienne-hd/lbc.git
synced 2026-04-23 07:15:37 +02: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
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
## v1.0.0
|
## 1.0.0
|
||||||
* Initial release
|
* Initial release
|
||||||
@@ -42,7 +42,7 @@ pip install lbc
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Client
|
### Client
|
||||||
To create client you need to use lbc.Client class
|
To create client you need to use `lbc.Client` class
|
||||||
```python
|
```python
|
||||||
import lbc
|
import lbc
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ class Session:
|
|||||||
impersonate="firefox",
|
impersonate="firefox",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
session.headers.update(
|
||||||
|
{
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Site': 'same-site',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if proxy:
|
if proxy:
|
||||||
session.proxies = {
|
session.proxies = {
|
||||||
"http": proxy.url,
|
"http": proxy.url,
|
||||||
|
|||||||
Reference in New Issue
Block a user