mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-19 05:09:17 +02:00
feat: Add improved search service with persistent browser connection for e-commerce scraping.
This commit is contained in:
1 parent
b5c5961618
commit
39893e8c1e
2 files changed
+214
-211
No files matched your search
@@ -1,6 +1,21 @@
|
||||
"""
|
||||
Improved Search Service - Using Persistent Browser Connection
|
||||
from app.services.parsers import ParserFactory, ProductResult
|
||||
Based on ScraperService pattern for better session management and reliability
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
from typing import AsyncGenerator, Optional
|
||||
from urllib.parse import quote_plus, urljoin, urlparse
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from playwright.async_api import Browser, BrowserContext, Page, async_playwright
|
||||
|
||||
from app.core.config import settings
|
||||
from app.core.search_config import SITE_CONFIGS, BROWSERLESS_URL
|
||||
from app.services.ai_price_extractor import AIPriceExtractor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in new issue
Block a user