mirror of
https://github.com/kristoferssolo/School.git
synced 2025-10-21 20:10:38 +00:00
Deleted Telegram bot
This commit is contained in:
parent
dca634b9b9
commit
5a8346ba28
@ -18,7 +18,7 @@ class IKEA:
|
|||||||
page = requests.get(url, headers=HEADERS)
|
page = requests.get(url, headers=HEADERS)
|
||||||
soup = BeautifulSoup(page.content, 'html.parser')
|
soup = BeautifulSoup(page.content, 'html.parser')
|
||||||
|
|
||||||
# getting page amount
|
# getting max page amount
|
||||||
for el in soup.find_all(class_='page-link'):
|
for el in soup.find_all(class_='page-link'):
|
||||||
cropped_name = el.get_text().strip()
|
cropped_name = el.get_text().strip()
|
||||||
if cropped_name.isnumeric():
|
if cropped_name.isnumeric():
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
import logging
|
|
||||||
from aiogram import Bot, Dispatcher, executor, types
|
|
||||||
from ikea import *
|
|
||||||
|
|
||||||
API_TOKEN = '1947128628:AAEXzb7_wow19ZResCNcV1Yh4BaRgSafx6w'
|
|
||||||
|
|
||||||
# Configure logging
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
|
|
||||||
# Initialize bot and dispatcher
|
|
||||||
bot = Bot(token=API_TOKEN)
|
|
||||||
dp = Dispatcher(bot)
|
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=['start', 'help'])
|
|
||||||
async def send_welcome(message: types.Message):
|
|
||||||
"""
|
|
||||||
This handler will be called when user sends `/start` or `/help` command
|
|
||||||
"""
|
|
||||||
await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.")
|
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=['curtains'])
|
|
||||||
async def ikea_curtain_catalog(message: types.Message):
|
|
||||||
await message.answer(curtains.get_data())
|
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=['echo'])
|
|
||||||
async def echo(message: types.Message):
|
|
||||||
await message.answer(message.text[5:])
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
executor.start_polling(dp, skip_updates=True)
|
|
||||||
Loading…
Reference in New Issue
Block a user