Update playwright/README.md
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
# IPython on Linux
|
||||
```python
|
||||
import asyncio; __import__('nest_asyncio').apply()
|
||||
from playwright.async_api import async_playwright
|
||||
playwright = await async_playwright().start()
|
||||
browser = await playwright.firefox.launch()
|
||||
page = await browser.new_page()
|
||||
page.goto = lambda url, goto=page.goto: asyncio.run(goto(url)) and page
|
||||
page._repr_png_ = lambda: asyncio.run(page.screenshot())
|
||||
page.goto('https://naver.com')
|
||||
```
|
||||
|
||||
```python
|
||||
"""
|
||||
Linux (WSL Debian)
|
||||
|
||||
Reference in New Issue
Block a user