Mercari Wrapper
A simple api wrapper around the Mercari jp site.
Simple usage can be something like
import mercari
for item in mercari.search("東方 ふもふも"):
print("{}, {}".format(item.name, item.productURL))
the item object contains the following properties:
- id
- productURL
- imageURL
- productName
- price
- status
- soldOut
Google Proxy
By default, the wrapper will try to use a google proxy to hide traffic. This is a bit finicky and I think google has wised up recently. To disable it and have your requests by direct to mercari, use it in the following way
This is false now, and the google proxyy is removed. Because of how the api endpoint works, this had to be removed.
I've left this part in here to not gaslight any one that it never existed.
import mercari
for item in mercari.search("東方 ふもふも", use_google_proxy=False):
print("{}, {}".format(item.productName, item.productURL))
The wrapper will throw on any 4xx or 5xx http status code.
Main reason I've seen errors is because mercari decides to throw 403 if they blacklist your IP. I've tried to get around this with the google proxy, but it seems like google themselves are blocking either the IP or the mercari domain.
Development
Clone this repo, install the dependencies in requirement.txt and off you go.
Deploying / Publishing
-
python setup.py sdist -
twine upload dist/mercari-<version>.tar.gz
Metadata
Release files for mercari 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mercari-1.0.2.tar.gz | 5.0 kB | Without provenance | Details for mercari-1.0.2.tar.gz |
Release files / mercari-1.0.2.tar.gz
| Download URL | mercari-1.0.2.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c1e869d2edc4bc139628f76125dee5a9a3e8a73ee71b3f62a836d6eb0aec920
|
|
BLAKE2b-256 checksum How to use checksums |
3a5a7edc68d803a6474862d917b7027e959d66dad79bba3acff8412d7bb28a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for mercari 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.