【发布时间】:2018-08-25 18:20:21
【问题描述】:
我正在制作一个电报聊天机器人,但不知道如何从输出中取出 [{'。
def tether(bot, update):
tetherCall = "https://api.omniexplorer.info/v1/property/31"
tetherCallJson = requests.get(tetherCall).json()
tetherOut = tetherCallJson ['issuances'][:1]
update.message.reply_text("Last printed tether: " + str (tetherOut)+" Please take TXID and past it in this block explorer to see more info: https://www.omniexplorer.info/search")
我的用户会将此视为回复:[{'grant': '25000000.00000000', 'txid': 'f307bdf50d90c92278265cd92819c787070d6652ae3c8af46fa6a96278589b03'}]
【问题讨论】:
标签: python json telegram-bot python-telegram-bot