Skip to content

Commit

Permalink
#39 iterating over global url list non-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gingeleski committed Mar 17, 2019
1 parent 3682926 commit 3111eea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions conspiracy.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import asyncio
from pyppeteer import launch

hitlist = ['http://example.com', 'https://play.google.com/store', 'https://play.google.com/store/apps']

async def browser_stuff():
global hitlist
browser = await launch()
page = await browser.newPage()
await page.goto('http://example.com')
await page.screenshot({'path': 'example.png'})
for url in hitlist:
page = await browser.newPage()
await page.goto(url)
await page.screenshot({'path': 'example_' + url.replace('/', '').replace(':', '') + '.png'})
await browser.close()

def main():
Expand Down

0 comments on commit 3111eea

Please sign in to comment.