Answer the question
In order to leave comments, you need to log in
How to get temp_C?
Here is the code
import telebot,requests
import json
response = requests.get(" api.worldweatheronline.com/premium/v1/weather.ashx... ")
r = response.json()["data"]
#print(r)
f=(r['current_condition'])
c=(f['temp_C'])
bot = telebot.TeleBot('1883463577:AAFKIw7nBzKvQ_0N9iUaL5l92ehX5gZmH5E')
@bot.message_handler(commands=['pogoda'])
def start_command(message) :
print(f)
bot.send_message(message.chat.id,f)
bot.polling()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question