Skip to main content

mercari api-like wrapper

Project description

Mercari Wrapper

A simple api wrapper around the Mercari jp site.

Simple usage can be something like

import mercari

for item in"東方 ふもふも"):
    print("{}, {}".format(item.productName, item.productURL))

the item object contains the following properties

  • productURL
  • imageURL
  • productName
  • price
  • productCode

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

import mercari

for item in"東方 ふもふも", 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.

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

mercari-0.0.6.tar.gz (3.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page