-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
https://pypi.org/project/pyppeteer/
$ ipython
Python 3.9.2 (default, Mar 3 2021, 11:58:52)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.21.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import asyncio
...: from pyppeteer import launch
In [2]: async def main():
...: browser = await launch(defaultViewport={'width': 1200, 'height': 800}, userDataDir='.')
...: page = await browser.newPage()
...: await page.goto('https://expdev.nsls2.bnl.gov/srw#/simulations')
...: await asyncio.sleep(5)
...: await page.screenshot({'path': 'example.png'})
...: await browser.close()
...:
In [3]: asyncio.get_event_loop().run_until_complete(main())Thanks for the pointers to @moellep!
Metadata
Metadata
Assignees
Labels
No labels
