Giter Club home page Giter Club logo

mercari's Introduction

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

mercari's People

Contributors

marvinody avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.