Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Last active March 31, 2024 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pointofpresence/ef38c5b452367ea676a52fe1794ef4f7 to your computer and use it in GitHub Desktop.
Save pointofpresence/ef38c5b452367ea676a52fe1794ef4f7 to your computer and use it in GitHub Desktop.
Скриншот страницы с помощью pyppeteer
import asyncio
from pyppeteer import launch
async def main():
browser = await launch()
page = await browser.newPage()
await page.goto('http://example.com')
await page.screenshot({'path': 'example.png', 'fullPage': 'true'})
await browser.close()
asyncio.get_event_loop().run_until_complete(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment