def get_pagination():
session = requests.Session()
req = session.get(base_url)
soup = BeautifulSoup(req.content, 'lxml')
return soup
from pyowm.exceptions import api_response_error
def send_echo(message):
try:
observation = owm.weather_at_place( message.text )
w = observation.get_weather()
temp = w.get_temperature('celsius')["temp"]
wind = w.get_wind()["speed"]
hum = w.get_humidity()
time = w.get_reference_time(timeformat='iso')
except api_response_error.NotFoundError:
bot.reply_to(message, '!!!!ERROR name of city!!!!!')