How to use the kibitzr.fetcher.browser.launcher.PROFILE_DIR function in kibitzr

To help you get started, we’ve selected a few kibitzr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kibitzr / kibitzr / kibitzr / fetcher / browser / fetcher.py View on Github external
def persistent_firefox():
    if not os.path.exists(PROFILE_DIR):
        os.makedirs(PROFILE_DIR)
    print("Kibitzr is running Firefox in persistent profile mode.")
    with firefox(headless=False) as driver:
        driver.get(HOME_PAGE)
        while True:
            prompt_return()
            try:
                # Property raises when browser is closed:
                driver.title
            except:
                # All kinds of things happen when closing Firefox
                break
            else:
                update_profile(driver)
                print(
                    "Firefox profile is saved. "
github kibitzr / kibitzr / kibitzr / fetcher / browser / fetcher.py View on Github external
def update_profile(driver):
    if os.path.exists(PROFILE_DIR):
        shutil.rmtree(PROFILE_DIR)
    shutil.copytree(
        driver.capabilities['moz:profile'],
        PROFILE_DIR,
        ignore=shutil.ignore_patterns(
            "parent.lock",
            "lock",
            ".parentlock",
            "*.sqlite-shm",
            "*.sqlite-wal",
        ),
github kibitzr / kibitzr / kibitzr / fetcher / browser / fetcher.py View on Github external
def update_profile(driver):
    if os.path.exists(PROFILE_DIR):
        shutil.rmtree(PROFILE_DIR)
    shutil.copytree(
        driver.capabilities['moz:profile'],
        PROFILE_DIR,
        ignore=shutil.ignore_patterns(
            "parent.lock",
            "lock",
            ".parentlock",
            "*.sqlite-shm",
            "*.sqlite-wal",
        ),
github kibitzr / kibitzr / kibitzr / fetcher / browser / fetcher.py View on Github external
def update_profile(driver):
    if os.path.exists(PROFILE_DIR):
        shutil.rmtree(PROFILE_DIR)
    shutil.copytree(
        driver.capabilities['moz:profile'],
        PROFILE_DIR,
        ignore=shutil.ignore_patterns(
            "parent.lock",
            "lock",
            ".parentlock",
            "*.sqlite-shm",
            "*.sqlite-wal",
        ),