Skip to content

Commit

Permalink
fix incorrect data parsing for trending cryptocurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
knighthinata committed Oct 6, 2024
1 parent 5b0306b commit a4e0a1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Constants
BOT_USERNAME: Final = 'xyz'
BOT_TOKEN: Final = "your token"
BOT_TOKEN: Final = "7274567873:AAE-h1rqRVUHtvsK1P5IWM1kQ772s8lEvtI"
COINGECKO_API_URL: Final = "https://api.coingecko.com/api/v3"

# Conversation states
Expand Down Expand Up @@ -77,6 +77,7 @@ async def show_crypto_list(update: Update, context: ContextTypes.DEFAULT_TYPE, c
for i in range(0, len(cryptos), 2):
row = []
for crypto in cryptos[i:i+2]:
crypto = crypto.get('item', crypto)
name = crypto.get('name', 'Unknown')
symbol = crypto.get('symbol', 'Unknown')
crypto_id = crypto.get('id', 'unknown')
Expand Down

0 comments on commit a4e0a1d

Please sign in to comment.