Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

philipperemy/mercari-python-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Python Mercari API (+Rakuma)

A Python interface to the unofficial Mercari/Rakuma API.

   

Example

from mercari import Mercari
from mercari import Rakuma

mercari_api = Mercari()
rakuma_api = Rakuma()

print('_' * 80)
print(mercari_api.name)
print(mercari_api.fetch_all_items(keyword='CHANEL')[0:10])
print(mercari_api.get_item_info('https://www.mercari.com/jp/items/m88046246209/'))

print('_' * 80)
print(rakuma_api.name)
print(rakuma_api.fetch_all_items(keyword='CHANEL')[0:10])
print(rakuma_api.get_item_info('https://item.fril.jp/9093de55f88bc28d47c35fd1d4dd23f0'))

Installation

From PyPI

pip install mercari_python

From the sources

pip install git+ssh://git.github.com/philipperemy/mercari-python-api

Monitoring

cd examples
# edit one of those two files to receive notifications.
cp gmail_conf.json.example gmail_conf.json # edit this file.
cp alertzy_conf.json.example alertzy_conf.json # edit this file.
python monitor.py --keywords "road bike,moto bike" --min_prices "0,0" --max_prices "43000,43000"

Note: Amazon AWS IPs are blacklisted by Mercari. So don't use AWS EC2 to run this script, it will not work.