A python client for web MagicCardMarket https://www.magiccardmarket.eu/
- httplib2
- mechanize
- lxml
pip install pymcm
If you install lxml from pip, you must install the following packages on Ubuntu.:
sudo apt-get install libxml2-dev libxslt-dev
import pymcm
mcm = MCMApi(username='foo', password='duu')
for result in mcm.search('sun titan'):
prind result.card.name, result.available
for wl in mcm.get_wants_list():
print wl.name
for want_card in wl.wants:
print want_card.card.name, want_card.amount
one_card = wl.wants[0].card
for pc in mcm.list_prices(one_card):
print "{0} ({1}): {2} {3}".format(pc.seller.name, pc.seller.country, pc.condition, pc.price)
pc = mcm.list_prices(one_card)[0]
mcm.add_to_cart(pc)
cart = mcm.get_cart()
print cart.total()
for ship in cart.ships():
print ship.seller.name
for a in ship.articles:
print a.card.name, a.price
pymcm is written by:
- Benito Rodriguez - brarcos@gmail.com
Suggestions, bugs,... https://github.com/b3ni/pymcm/issues