2 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
etienne-hd
e7668b5d89 1.0.1 2025-06-20 17:41:50 +02:00
etienne-hd
a42332e4ef added 'Sec-Fetch-*' headers to prevent 403 error 2025-06-20 17:38:31 +02:00
5 changed files with 18 additions and 4 deletions

3
.gitignore vendored
View File

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

View File

@@ -1,2 +1,6 @@
## v1.0.0
## 1.0.1
### Added
* Realistic `Sec-Fetch-*` headers to prevent 403 errors.
## 1.0.0
* Initial release

View File

@@ -1,6 +1,5 @@
# lbc
[![Latest version](https://img.shields.io/pypi/v/lbc?style=for-the-badge)](https://pypi.org/project/lbc)
![PyPI - Downloads](https://img.shields.io/pypi/dm/lbc?style=for-the-badge)
[![GitHub license](https://img.shields.io/github/license/etienne-hd/lbc?style=for-the-badge)](https://github.com/etienne-hd/lbc/blob/master/LICENSE)
**Unofficial client for Leboncoin API**
@@ -42,7 +41,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

View File

@@ -1,6 +1,6 @@
[project]
name = "lbc"
version = "1.0.0"
version = "1.0.1"
description = "Unofficial client for Leboncoin API"
readme = "README.md"
license = {text = "MIT"}

View File

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