mirror of
https://github.com/etienne-hd/lbc.git
synced 2026-04-17 20:55:36 +02:00
add support for searching with full Leboncoin URLs and new shippable argument
This commit is contained in:
@@ -22,8 +22,8 @@ def main() -> None:
|
||||
category=lbc.Category.IMMOBILIER,
|
||||
owner_type=lbc.OwnerType.ALL,
|
||||
search_in_title_only=True,
|
||||
square=[200, 400],
|
||||
price=[300_000, 700_000],
|
||||
square=(200, 400),
|
||||
price=[300_000, 700_000]
|
||||
)
|
||||
|
||||
for ad in result.ads:
|
||||
16
tests/test_search_with_url.py
Normal file
16
tests/test_search_with_url.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import lbc
|
||||
|
||||
def main() -> None:
|
||||
client = lbc.Client()
|
||||
|
||||
result = client.search(
|
||||
url="https://www.leboncoin.fr/recherche?category=9&text=maison&locations=Paris__48.86023250788424_2.339006433295173_9256&square=100-200&price=500000-1000000&rooms=1-6&bedrooms=3-6&outside_access=garden,terrace&orientation=south_west&owner_type=private",
|
||||
page=1,
|
||||
limit=35
|
||||
)
|
||||
|
||||
for ad in result.ads:
|
||||
print(ad.id, ad.url, ad.subject, ad.price)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user