Даю участок кода, который не воспроизводиться при попытке сделать это.
@dp.message_handler(Text(equals='Ноутбуки', ignore_case=True), state=PriceState.parser)
@dp.message_handler(commands=['laptops'], state=PriceState.parser)
async def parsing_laptops(message: types.Message, state: FSMContext):
data = await state.get_data()
url = 'https://www.kufar.by/l/r~vitebsk/noutbuki'
params = {'prc': f'r%3A{data["min_price"]*100}%2C{data["max_price"]*100}', 'sort': 'lst.d'}
with requests.get(url, params=params) as r:
b = BeautifulSoup(r.text, 'html.parser')
i = 0
for section in b.find_all('section'):
price = str(section.span.text)
title = str(section.find('h3', {'class': 'styles_title__ARIVF'}).text)
city = str(section.find('div', {'class': 'styles_secondary__NEYhw'}).p.text)
url = str(section.find('a', {'class': 'styles_wrapper__yaLfq'})['href'])
url_photo = section.find('img', {'class': 'styles_image__eGgZr lazyload'})['data-src']
caption = f'Название: {title}\nГород: {city}\nЦена: {price}\nСсылка на объявление: {url}'
await message.answer_photo(photo=url_photo, caption=caption)