refactored logging with json_logs func
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from loguru import logger
|
||||
from playwright.async_api import async_playwright
|
||||
from playwright.async_api import Playwright
|
||||
from aio_pika import Message, connect, DeliveryMode
|
||||
@@ -38,12 +39,13 @@ async def run(playwright: Playwright):
|
||||
routing_key='hello',
|
||||
)
|
||||
|
||||
print(f" [x] Sent '{body}'")
|
||||
logger.info(f" [x] Sent '{body}'")
|
||||
await page.keyboard.press("ArrowDown")
|
||||
|
||||
while title == await page.title():
|
||||
await page.title()
|
||||
|
||||
|
||||
async def main():
|
||||
async with async_playwright() as playwright:
|
||||
await run(playwright)
|
||||
|
||||
Reference in New Issue
Block a user