Last active
March 31, 2024 18:55
-
-
Save pointofpresence/ef38c5b452367ea676a52fe1794ef4f7 to your computer and use it in GitHub Desktop.
Скриншот страницы с помощью pyppeteer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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