Python
    6
    Вклад в тег
    
      
      
    
  
  
bot.register_next_step в своем коде , вот пример как он работает import telebot
import requests
from telebot import types
global stairs
bot = telebot.TeleBot('token')
@bot.message_handler(commands=["start"])
def start(m, res=False):
    bot.send_message(m.chat.id, 'Хотите узнать погоду?\nВведите свой город')
    bot.register_next_step_handler_by_chat_id(m.chat.id, regist)
@bot.message_handler(content_types=['text'])
def main(m):
    if m.text.strip() == 'Текущая погода в городе':
        bot.send_message(m.chat.id, f'Сейчас в {stairs} - жарко')
def regist(message):
    global stairs
    stairs = message.text
    bot.send_message(message.chat.id, f'Твой город :{message.text}')
bot.polling(none_stop=True, interval=0)      product_stock = soup.find_all('div', class_='items-stock')product_stock = soup.find_all('span', class_='value')for stock_check in product_stock:
        if stock_check.text != 'Нет в наличии':
            for name in product_names:
                href.append('https://estel-shop.ru' + name.a['href'])
                title.append(name.text)
                print(name.text.strip())
                print('https://estel-shop.ru' + name.a['href'])
                for price in product_price:
                    print(price.text)
                    cost.append(price.text)Estel Princess Essex 10/76 Светлый блондин коричнево-фиолетовый (Снежный лотос)
https://estel-shop.ru/catalog/kraska_dlya_volos_1/5150/
360
1 060
670
385
385
670
670
770
950