mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-23 15:18:12 +02:00
chore: configure local Browserless URL for debugging.
This commit is contained in:
1 parent
fa4d454063
commit
ad16e461a4
4 files changed
+1653
-1
No files matched your search
@@ -11,10 +11,14 @@ 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}...")
|
||||
|
||||
|
||||
# Use host port for local debugging
|
||||
os.environ["BROWSERLESS_URL"] = "ws://localhost:3012"
|
||||
|
||||
await browserless_service.initialize()
|
||||
try:
|
||||
content, _ = await browserless_service.get_page_content(url, wait_selector="body")
|
||||
@@ -24,5 +28,6 @@ async def inspect():
|
||||
finally:
|
||||
await browserless_service.shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(inspect())
|
||||
Reference in new issue
Block a user