initial commit
This commit is contained in:
parent
ed99b8535a
commit
df2b38dc99
0
emoneyscraper/main.py
Normal file
0
emoneyscraper/main.py
Normal file
12
emoneyscraper/scraper.py
Normal file
12
emoneyscraper/scraper.py
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
from playwright.sync_api import sync_playwright, Playwright
|
||||||
|
|
||||||
|
def run(playwright: Playwright):
|
||||||
|
chromium = playwright.chromium # or "firefox" or "webkit".
|
||||||
|
browser = chromium.launch()
|
||||||
|
page = browser.new_page()
|
||||||
|
page.goto("http://example.com")
|
||||||
|
# other actions...
|
||||||
|
browser.close()
|
||||||
|
|
||||||
|
with sync_playwright() as playwright:
|
||||||
|
run(playwright)
|
||||||
Loading…
Reference in a new issue