简体中文
Telegram

讨论串import requests

2 条消息 · –
V
import requests API_URL = "https://coronavirus-api.net/get_all?country={country}" def get_list_for_country(country): resp = requests.get(API_URL.format(country=country)) return resp.json() def print_info(confirmed, deaths, recovered): print("Подтверждённых больных", confirmed) print("Смертей", deaths) print("Подтверждённых выздоровлений", recovered) if __name__ == '__main__': list_of_actions = get_list_for_country("Russia") last_action = list_of_actions[-1] confirmed = last_action['Confirmed'] deaths = last_action['Deaths'] recovered = last_action['Recovered'] print_info(confirmed, deaths, recovered)
  1. A
    Как раз пишу бота для этого

来自搜索索引的公开信息流 ChatCrawler ——“公开 Telegram 的 Google”;随着该社群被抓取而更新。 时间为 UTC。

仅限公开内容,使用 Telegram 官方 API。 关于 · 常见问题 · 索引限制 · 移除页面 · 目录 · 搜索 · 计算方法