guptarohit/cryptoCMD

What coin...

nazariyv opened this issue · 3 comments

would be nice to know which coin please :)

I am also wondering, is there a way to skip such a coin when you are in a loop scraping the data from multiple coins?

Example code:
except InvalidCoinCode: Continue

@Boterbabbelaar Check the following snippet might be useful for your case:

from cryptocmd import CmcScraper
from cryptocmd.utils import InvalidCoinCode

coins = ["BTC", "ETH", "RANDOMCODE", "XRP"]

for coin in coins:
    try:
        scraper = CmcScraper(coin, start_date="10-06-2019", end_date="15-06-2019")
        scraper.export("csv")
    except InvalidCoinCode as e:
        print(e)
        print("skipping: {}".format(coin))
        continue

🧀 ✨