Closed FreeM1ne closed 8 months ago
Later I may globally update many things from Dolphin in the API, but for now it can be done like this:
async def main():
browser = await dolphin.get_browser(ws_endpoint, port)
pages = await browser.pages()
page = pages[0]
with open(cookie_file, 'r') as f:
cookies = json.load(f)
for cookie in cookies:
await page.setCookie({'name': cookie['name'], 'value': cookie['value'], 'domain': cookie['domain']})
await page.goto('http://google.com/')
await asyncio.sleep(5)
await browser.disconnect()
add import cookie