def search_similar_products(product_info, num_results=5):
    similar_products = []
    search_query = quote_plus(product_info['title'])
    search_urls = [
        f"https://www.wildberries.ru/catalog/0/search.aspx?search={search_query}",
        f"https://www.ozon.ru/search/?text={search_query}",
        f"https://market.yandex.ru/search?text={search_query}"
    ]
    
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
    }
    
    for url in search_urls:
        logger.info(f"Поиск на: {url}")
        try:
            response = requests.get(url, headers=headers, timeout=10)
            response.raise_for_status()
            soup = BeautifulSoup(response.text, 'html.parser')
            
            # Поиск товаров на Wildberries
            if 'wildberries.ru' in url:
                products = soup.find_all('div', class_=['product-card', 'j-card-item'])
                logger.info(f"Найдено продуктов на Wildberries: {len(products)}")
                for product in products[:num_results]:
                    title = product.find(['span', 'div'], class_=['goods-name', 'product-card__name'])
                    price = product.find(['span', 'ins'], class_=['price-current', 'lower-price'])
                    link = product.find('a', class_=['product-card__main', 'j-open-full-product-card'])
                    if title and price and link:
                        similar_products.append({
                            'title': title.text.strip(),
                            'price': price.text.strip(),
                            'url': urljoin(url, link['href'])
                        })
            
            # Поиск товаров на Ozon
            elif 'ozon.ru' in url:
                products = soup.find_all('div', class_=['tile-root', 'x5-a'])
                logger.info(f"Найдено продуктов на Ozon: {len(products)}")
                for product in products[:num_results]:
                    title = product.find(['span', 'div'], class_=['tsBody500Medium', 'tile-hover-target'])
                    price = product.find(['span', 'div'], class_=['tsHeadline500Medium', 'c2h5'])
                    link = product.find('a', class_=['tile-hover-target', 'tile-link'])
                    if title and price and link:
                        similar_products.append({
                            'title': title.text.strip(),
                            'price': price.text.strip(),
                            'url': urljoin(url, link['href'])
                        })
            
            # Поиск товаро на Яндекс.Маркет
            elif 'market.yandex.ru' in url:
                products = soup.find_all('div', class_=['_2im8-', '_2S9MU', '_2jvJ4'])
                logger.info(f"Найдено продуктов на Яндекс.Маркет: {len(products)}")
                for product in products[:num_results]:
                    title = product.find(['h3', 'div'], class_=['_2UHry', '_3t7Is'])
                    price = product.find(['span', 'div'], class_=['_3NaXx', '_33ZFz', '_2m5MZ'])
                    link = product.find('a', class_=['_2f75n', '_3Lwc_'])
                    if title and price and link:
                        similar_products.append({
                            'title': title.text.strip(),
                            'price': price.text.strip(),
                            'url': urljoin(url, link['href'])
                        })
            
            logger.info(f"Найдено похожих товаров: {len(similar_products)}")
        except requests.RequestException as e:
            logger.warning(f"Ошибка при запросе к {url}: {str(e)}")
        except Exception as e:
            logger.error(f"Неожиданная ошибка при поиске похожих товаров на {url}: {str(e)}")
    
    return similar_products[:num_results] исправь ошибки