Update playwright/README.md
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
```python
|
||||
# play.py
|
||||
from playwright.async_api import async_playwright as aP
|
||||
import xvfbwrapper, io, os
|
||||
import xvfbwrapper, io, os, asyncio
|
||||
from db import DB
|
||||
|
||||
async def Page(browser='chromium', headless=True):
|
||||
@@ -34,6 +34,7 @@ async def main():
|
||||
page = await Page()
|
||||
await page.goto('https://naver.com')
|
||||
await page.screenshot(path='screenshot.png')
|
||||
await asyncio.sleep(1) # 1초 대기 추가
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user