A small Python package to request listings from marktplaats.nl
Project description
marktplaats-py
A small Python package to request listings from marktplaats.nl. It supports python 3.7+.
Installing
pip3 install marktplaats
Example
This is an example on how to use the library:
from datetime import datetime, timedelta
from marktplaats import SearchQuery, SortBy, SortOrder
search = SearchQuery("fiets", # Search query
zip_code="1016LV", # Zip code to base distance from
distance=100000, # Max distance from the zip code for listings
price_from=0, # Lowest price to search for
price_to=100, # Highest price to search for
limit=5, # Max listings (page size, max 25)
offset=0, # Offset for listings (page * limit)
sort_by=SortBy.OPTIMIZED, # DATE, PRICE, LOCATATION, OPTIMIZED
sort_order=SortOrder.ASC, # ASCending or DESCending
offered_since=datetime.now() - timedelta(days=7)) # Filter listings since a point in time
listings = search.get_listings()
for listing in listings:
print(listing.title)
print(listing.description)
print(listing.price)
print(listing.link)
# the location object
print(listing.location)
# the seller object
print(listing.seller)
# the datetime object
print(listing.date)
# the full seller object (another request)
print(listing.seller.get_seller())
for image in listing.images:
print(image.medium)
print("-----------------------------")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file marktplaats-0.1.5.tar.gz
.
File metadata
- Download URL: marktplaats-0.1.5.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e43a3ba4610256b0ab3f61caebc1bdac55d44819526be0d6fb2d3fe1b7113bf8 |
|
MD5 | d96cae04f50b3d5731e6b37221a1b0ce |
|
BLAKE2b-256 | 76f75d916765926417e46882b4f6d1f72814a5bfbd90d718aa22536cae25668f |
Provenance
The following attestation bundles were made for marktplaats-0.1.5.tar.gz
:
Publisher:
publish_to_pypi.yaml
on jensjeflensje/marktplaats-py
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
marktplaats-0.1.5.tar.gz
- Subject digest:
e43a3ba4610256b0ab3f61caebc1bdac55d44819526be0d6fb2d3fe1b7113bf8
- Sigstore transparency entry: 158710102
- Sigstore integration time:
- Permalink:
jensjeflensje/marktplaats-py@da84fa5fc0e779ced7d7bbb8b0a14a00b2e39ec7
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/jensjeflensje
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish_to_pypi.yaml@da84fa5fc0e779ced7d7bbb8b0a14a00b2e39ec7
- Trigger Event:
workflow_dispatch
- Statement type:
File details
Details for the file marktplaats-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: marktplaats-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d9171c0ef6cac0af7d6e598560b1f5821d174a5ddb904fb85b961a7d9e0ef10 |
|
MD5 | 4c1f4ea99385bcdd225ad600bdecced8 |
|
BLAKE2b-256 | 8f28fa3385db405108ef0330fd8da70dd813c964b9c3d8d289fc1fbe55f2c9fd |
Provenance
The following attestation bundles were made for marktplaats-0.1.5-py3-none-any.whl
:
Publisher:
publish_to_pypi.yaml
on jensjeflensje/marktplaats-py
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
marktplaats-0.1.5-py3-none-any.whl
- Subject digest:
6d9171c0ef6cac0af7d6e598560b1f5821d174a5ddb904fb85b961a7d9e0ef10
- Sigstore transparency entry: 158710104
- Sigstore integration time:
- Permalink:
jensjeflensje/marktplaats-py@da84fa5fc0e779ced7d7bbb8b0a14a00b2e39ec7
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/jensjeflensje
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish_to_pypi.yaml@da84fa5fc0e779ced7d7bbb8b0a14a00b2e39ec7
- Trigger Event:
workflow_dispatch
- Statement type: