|
|
|
@ -59,6 +59,15 @@ class Tab: |
|
|
|
time.sleep(wait_for) |
|
|
|
return self.get_source() |
|
|
|
|
|
|
|
def set_download_location(self, path): |
|
|
|
cdp = run(self.page_handle.target.createCDPSession()) |
|
|
|
run( |
|
|
|
cdp.send( |
|
|
|
"Page.setDownloadBehavior", |
|
|
|
{"behavior": "allow", "downloadPath": downloadPath}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
def start_browser(proxy=None, use_adblock=True, **launch_opts): |
|
|
|
opts = launch_opts |
|
|
|
|