mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
29 lines
820 B
Python
29 lines
820 B
Python
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())
|