English
Open in Telegram

Threadimport requests

2 messages · –
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
    Как раз пишу бота для этого
ССообщество Python ПрограммистовСообщество Python Программистов@python_scripts · group · Tech
4 169members43writing in 30 days
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count