This code accepts BTC, ICX,..... inputs one at a time and i would to make accept multiple inputs and output multiple files with the same name as the input. How can i do it?
eg. ETH,ICX, ALG...
Edit: i would like to give n currencies.
from cryptocmd import CmcScraper
currency = input("enter currency:")
date_from = input("enter begining date")
date_to = input ("enter end date")
# initialise scraper with time interval
if date_from and date_to:
scraper = CmcScraper(currency, date_from, date_to)
else:
scraper = CmcScraper(currency)
# get raw data as list of list
headers, data = scraper.get_data()
# get data in a json format
json_data = scraper.get_data("json")
# export the data to csv
scraper.export("csv")
# get dataframe for the data
df = scraper.get_dataframe()
whileloop as:while(True): ... if currency=="": breakand break the loop if currency is emptyif date_from and date_to: ................................... df = scraper.get_dataframe() if currency=="": break...... Dont i have to use a split function coz of the N inputs?