added 'Sec-Fetch-*' headers to prevent 403 error

This commit is contained in:
etienne-hd
2025-06-20 17:38:31 +02:00
parent 7de8d5bab2
commit a42332e4ef
4 changed files with 13 additions and 2 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# lbc
publish.sh
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]

View File

@@ -1,2 +1,2 @@
## v1.0.0 ## 1.0.0
* Initial release * Initial release

View File

@@ -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

View File

@@ -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,