django voice server code example

Example 1: django voice lib

import asyncio
from pyppeteer import connect

from time import sleep

async def inspect_urls(urls):
    #example URI. Copy and paste from Chrome output
    #run Chrome using (Mac):
    #mkdir ~/chrome-dev
    #/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --user-data-dir=~/chrome-dev
    
    ws = "ws://127.0.0.1:9222/devtools/browser/52112a5a-7555-4743-a37f-5fb26bd81b92"
    
    browser = await connect({"browserWSEndpoint": ws})
    page = await browser.newPage()
    #optional viewport resize
    await page.setViewport({"width": 1920, "height": 1280})

Example 2: django voice lib

await page.goto('https://search.google.com/search-console?resource_id=https%3A%2F%2Fwww.ranksense.com%2F',
           {"waitUntil": "networkidle0"})

print(url)