import asyncio
from pyppeteer import launch
async def main():
browser = await launch({'headless': True, 'args': ['--no-sandbox']})
page = await browser.newPage()
await page.setViewport({"width": 1280, "height": 926})
await page.goto('https://intoli.com/blog/saving-images/')
await page.waitForSelector('#svg')
svg_image = await page.querySelector('#svg')
await svg_image.screenshot({
'path': 'logo-screenshot.png',
'omitBackground': True,
})
await browser.close()
if __name__ == '__main__':
asyncio.get_event_loop().run_until_complete(main())