Merge pull request #974 from cesarhub/patch-1

This commit is contained in:
J.Townsend 2021-12-31 19:53:29 +00:00 committed by GitHub
commit d074a03ae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,8 @@ async def take_screenshot(self, url):
print(f'Attempting to take a screenshot of: {url}')
browser = await launch(headless=True, ignoreHTTPSErrors=True, args=["--no-sandbox"])
context = await browser.createIncognitoBrowserContext()
page = await browser.newPage()
# Create a new page in a pristine context.
page = await context.newPage()
path = fr'{self.output}{self.slash}{url.replace("http://", "").replace("https://", "")}.png'
date = str(datetime.utcnow())
try: