mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-21 22:28:11 +02:00
feat: Implement improved search service with supporting models, schemas, and API routers, and refactor site verification script.
This commit is contained in:
1 parent
4720ed6b93
commit
9855040f3e
21 files changed
+57932
-419
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add project root to path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".")))
|
||||
|
||||
from app.services.browserless_service import browserless_service
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
async def inspect():
|
||||
url = "https://www.lincroyable.fr/recherche-query=iphone/"
|
||||
print(f"Inspecting {url}...")
|
||||
|
||||
await browserless_service.initialize()
|
||||
try:
|
||||
content, _ = await browserless_service.get_page_content(url, wait_selector="body")
|
||||
with open("lincroyable_dump.html", "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
print("HTML dumped to lincroyable_dump.html")
|
||||
finally:
|
||||
await browserless_service.shutdown()
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(inspect())
|
||||
Reference in new issue
Block a user