Skip to content

Commit

Permalink
fix wrong coin id issue for EOS
Browse files Browse the repository at this point in the history
closes #32
  • Loading branch information
guptarohit committed Nov 30, 2020
1 parent c2d6731 commit 4686258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cryptocmd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_coin_id(coin_code):
for _row in data_table.findall("tr"):
symbol = _row.findall("td")[2].text_content()
coin_link = _row.findall("td")[1].find_class("cmc-link")[0]
coin_id = coin_link.values()[0].lstrip("/currencies/")[:-1]
coin_id = coin_link.values()[0].split("/")[-2]
if symbol == coin_code:
return coin_id
raise InvalidCoinCode("'{}' coin code is unavailable on coinmarketcap.com".format(coin_code))
Expand Down

0 comments on commit 4686258

Please sign in to comment.