mirror of
https://github.com/etienne-hd/lbc.git
synced 2026-02-07 16:41:52 +01:00
fix: set impersonate to chrome_android in utils
This commit is contained in:
@@ -11,7 +11,7 @@ def print_category(category_data: dict, category_name: Optional[str] = None) ->
|
||||
print(f'{f"{category_name}_" if category_name else ""}{label} = "{category_data['catId']}"')
|
||||
|
||||
def main() -> None:
|
||||
client = lbc.Client()
|
||||
client = lbc.Client(impersonate="chrome_android")
|
||||
body = client._fetch(method="GET", url="https://api.leboncoin.fr/api/frontend/v1/data/v7/fdata")
|
||||
|
||||
for category in body["categories"]:
|
||||
|
||||
@@ -9,7 +9,7 @@ def print_department(department_data: dict, region: dict) -> None:
|
||||
print(f'{name} = ("{region['rId']}", "{transform_str(region['rName'])}", "{department_data["dId"]}", "{name}")')
|
||||
|
||||
def main() -> None:
|
||||
client = lbc.Client()
|
||||
client = lbc.Client(impersonate="chrome_android")
|
||||
body = client._fetch(method="GET", url="https://api.leboncoin.fr/api/frontend/v1/data/v7/fdata")
|
||||
|
||||
for region in body["regions"]:
|
||||
|
||||
@@ -9,7 +9,7 @@ def print_region(region_data: dict) -> None:
|
||||
print(f'{name} = ("{region_data['rId']}", "{name}")')
|
||||
|
||||
def main() -> None:
|
||||
client = lbc.Client()
|
||||
client = lbc.Client(impersonate="chrome_android")
|
||||
body = client._fetch(method="GET", url="https://api.leboncoin.fr/api/frontend/v1/data/v7/fdata")
|
||||
|
||||
for region in body["regions"]:
|
||||
|
||||
Reference in New Issue
Block a user