Skip to content

Commit 8542d91

Browse files
committed
data scraping fixed with cryptocmd
1 parent cd51b55 commit 8542d91

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

app.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
cryp_label = crypcode["currency name"].tolist()
2626

2727
# set date for importing data
28-
todate = datetime.today().strftime("%Y-%m-%d")
29-
firstdate = pd.to_datetime(todate, format="%Y-%m-%d") - pd.to_timedelta(
28+
todate = datetime.today().strftime("%d-%m-%Y")
29+
firstdate = pd.to_datetime(todate, format="%d-%m-%Y") - pd.to_timedelta(
3030
365 , unit="d"
3131
)
3232

@@ -104,7 +104,7 @@ def CryptoForecast(SelectCrypto):
104104
# ).reset_index()
105105
# cryptodata.columns = cryptodata.columns.get_level_values(0)
106106

107-
scraper = CmcScraper(SelectCrypto, "15-01-2021", "11-07-2021")
107+
scraper = CmcScraper(SelectCrypto, firstdate, todate)
108108
cryptodata = scraper.get_dataframe()
109109

110110
cryp_pro = cryptodata[["Date", "Close"]]

crypcode.csv

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
currency code,currency name
2+
AAVE,Aave
3+
ADA,Cardano
4+
BCH,Bitcoin Cash
25
BNB,Binance Coin
36
BTC,Bitcoin
4-
BCH,Bitcoin Cash
5-
ADA,Cardano
7+
BUSD,Binance USD
8+
DOGE,Doge Coin
9+
ETC,Ethereum Classic
610
ETH,Ethereum
11+
FIL,"Filecoin
12+
"
13+
FTT,FTX Token
14+
ICP,Internet Computer
715
LTC,Litecoin
8-
XMR,Monero
9-
XLM,Stellar
16+
SOL,Solana
17+
USDC,"USD Coin
18+
"
1019
USDT,Tether
20+
WBTC,"Wrapped Bitcoin
21+
"
22+
XLM,Stellar
23+
XMR,Monero
24+
XRP,XRP

0 commit comments

Comments
 (0)