{
  "id": "task_libraries:browser-automation/python",
  "path": "/exapedia/python-browser-automation-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python browser automation libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python browser automation libraries control a real browser from code to click, type, navigate, and read pages. A driver sends commands to the browser over the WebDriver standard or the Chrome DevTools Protocol. These libraries let test suites, scrapers, and AI agents operate websites that have no API."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python browser automation libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#playwright",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F123"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#selenium",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#browser-use",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#browser-use-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#patchright",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#undetected-chromedriver",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#stagehand",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#seleniumbase",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#playwright",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Synchronous entry point",
            "Hosted browser service required"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#playwright",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F123"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#selenium",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#browser-use",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#browser-use-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#patchright",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#undetected-chromedriver",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#stagehand",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#seleniumbase",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "playwright",
          "name": [
            {
              "t": "fact",
              "fact": "F123"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/microsoft/playwright-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/playwright"
            },
            {
              "label": "Docs",
              "href": "https://playwright.dev/python/docs/library"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F13"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://playwright.dev/python/docs/library",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F123"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/scrapy-plugins/scrapy-playwright",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def _create_browser_context(\n    self,\n    name: str,\n    context_kwargs: Optional[dict],\n    spider: Optional[Spider] = None,\n) -> BrowserContextWrapper:\n    \"\"\"Create a new context, also launching a local browser or connecting\n    to a remote one if necessary.\n    \"\"\"\n    acquired = False\n    if hasattr(self, \"context_semaphore\"):\n        await self.context_semaphore.acquire()\n        acquired = True\n    try:\n        context_kwargs = context_kwargs or {}\n        persistent = remote = False\n        if context_kwargs.get(PERSISTENT_CONTEXT_PATH_KEY):\n            context = await self.browser_provider.launch_persistent_context(context_kwargs)\n            persistent = True\n        else:\n            await self._maybe_launch_browser()\n            context = await self.browser.new_context(**context_kwargs)\n            remote = bool(self.config.cdp_url or self.config.connect_url)\n    except Exception:\n        if acquired:\n            self.context_semaphore.release()\n        raise\n\n    context.on(\n        \"close\", self._make_close_browser_context_callback(name, persistent, remote, spider)\n    )\n    self.stats.inc_value(\"playwright/context_count\")\n    self.stats.inc_value(f\"playwright/context_count/persistent/{persistent}\")\n    self.stats.inc_value(f\"playwright/context_count/remote/{remote}\")\n    logger.debug(\n        \"Browser context started: '%s' (persistent=%s, remote=%s)\",\n        name,\n        persistent,\n        remote,\n        extra={\n            \"spider\": spider,\n            \"context_name\": name,\n            \"persistent\": persistent,\n            \"remote\": remote,\n        },\n    )\n    if self.config.navigation_timeout_ms is not None:\n        context.set_default_navigation_timeout(self.config.navigation_timeout_ms)\n    self.context_wrappers[name] = BrowserContextWrapper(\n        context=context,\n        semaphore=asyncio.Semaphore(value=self.config.max_pages_per_context),\n        persistent=persistent,\n    )\n    self._set_stats_max_concurrent_context_count()\n    return self.context_wrappers[name]",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/scrapy-plugins/scrapy-playwright/blob/3d513d6b1e707db7294fcf9df2e5a3feb3428e62/scrapy_playwright/handler.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F135"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20playwright%20for%20browser%20context%20lifecycle%2C%20robust%20element%20actions%2C%20cookie%20cleanup%2C%20navigation%20and%20HTML%20form%20submission&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F123"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from playwright.sync_api import sync_playwright\n\nwith sync_playwright() as client:\n    browser = client.chromium.launch()\n    page = browser.new_page()\n    page.goto(\"https://example.com\")\n    browser.close()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://playwright.dev/python/docs/api/class-browser",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F128"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "selenium",
          "name": [
            {
              "t": "fact",
              "fact": "F138"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/SeleniumHQ/selenium"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/selenium"
            },
            {
              "label": "Docs",
              "href": "https://www.selenium.dev/selenium/docs/api/py/api.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.selenium.dev/selenium/docs/api/py/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F138"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/seleniumbase/SeleniumBase",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def hover_element_and_double_click(\n    driver,\n    element,\n    click_selector,\n    click_by=\"css selector\",\n    timeout=settings.SMALL_TIMEOUT,\n):\n    _reconnect_if_disconnected(driver)\n    start_ms = time.time() * 1000.0\n    stop_ms = start_ms + (timeout * 1000.0)\n    hover = ActionChains(driver).move_to_element(element)\n    for x in range(int(timeout * 10)):\n        try:\n            hover.perform()\n            element_2 = driver.find_element(by=click_by, value=click_selector)\n            actions = ActionChains(driver)\n            actions.move_to_element(element_2)\n            actions.double_click(element_2)\n            actions.perform()\n            return element_2\n        except Exception:\n            now_ms = time.time() * 1000.0\n            if now_ms >= stop_ms:\n                break\n            time.sleep(0.1)\n    plural = \"s\"\n    if timeout == 1:\n        plural = \"\"\n    message = \"Element {%s} was not present after %s second%s!\" % (\n        click_selector,\n        timeout,\n        plural,\n    )\n    timeout_exception(NoSuchElementException, message)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/seleniumbase/SeleniumBase/blob/4266bb6d8a3ca4a8e0dc498920e5735a6b1d0347/seleniumbase/fixtures/page_actions.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F150"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20selenium%20for%20browser%20context%20lifecycle%2C%20robust%20element%20actions%2C%20cookie%20cleanup%2C%20navigation%20and%20HTML%20form%20submission&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F138"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from selenium import webdriver\n\ndriver = webdriver.Chrome()\ntry:\n    driver.get(\"https://example.com\")\nfinally:\n    driver.quit()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/selenium/4.53.0/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "first_script.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F143"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "browser-use",
          "name": [
            {
              "t": "fact",
              "fact": "F153"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/browser-use/browser-use"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/browser-use"
            },
            {
              "label": "Docs",
              "href": "https://docs.browser-use.com"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F160"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.browser-use.com",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from browser_use import Agent\n\nresult = Agent(\"Open https://example.com and return its title\").run_sync()\nprint(result.final_result())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/browser-use/1.0.6/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=browser-use%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F158"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "browser-use-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/browser-use/sdk"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/browser-use-sdk"
            },
            {
              "label": "Docs",
              "href": "https://github.com/browser-use/browser-use/blob/main/skills/cloud/references/api-v4.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F173"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/browser-use/browser-use/blob/main/skills/cloud/references/api-v4.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from browser_use_sdk.v4 import BrowserUse\n\nwith BrowserUse() as client:\n    created = client.runs.create(\"Open https://example.com and return its title\")\n    result = client.runs.wait_for_completion(created.id)\n    print(result.result)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/browser-use-sdk/3.12.1/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=browser-use-sdk%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "patchright",
          "name": [
            {
              "t": "fact",
              "fact": "F179"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/patchright"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F186"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/unclecode/crawl4ai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def retrieve_console_messages(self, page: UndetectedPage) -> List[Dict]:\n    \"\"\"Retrieve captured console messages and errors from the page\"\"\"\n    messages = []\n\n    try:\n        # Get console messages\n        console_messages = await page.evaluate(\n            \"() => { const msgs = window.__capturedConsole || []; window.__capturedConsole = []; return msgs; }\",\n            isolated_context=False\n        )\n        messages.extend(console_messages)\n\n        # Get errors\n        errors = await page.evaluate(\n            \"() => { const errs = window.__capturedErrors || []; window.__capturedErrors = []; return errs; }\",\n            isolated_context=False\n        )\n        messages.extend(errors)\n\n        # Convert timestamps from JS to Python format\n        for msg in messages:\n            if 'timestamp' in msg and isinstance(msg['timestamp'], (int, float)):\n                msg['timestamp'] = msg['timestamp'] / 1000.0  # Convert from ms to seconds\n\n    except Exception:\n        # If retrieval fails, return empty list\n        pass\n\n    return messages",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/unclecode/crawl4ai/blob/bf0c7925e21992af972039672fecd8e85163b575/crawl4ai/browser_adapter.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=patchright%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from patchright.sync_api import sync_playwright\n\nwith sync_playwright() as client:\n    browser = client.chromium.launch()\n    page = browser.new_page()\n    page.goto(\"https://example.com\")\n    browser.close()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/patchright/1.64.4/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "undetected-chromedriver",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ultrafunkamsterdam/undetected-chromedriver"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/undetected-chromedriver"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F203"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/ultrafunkamsterdam/undetected-chromedriver",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/ed-donner/agents",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def fetch_js_website(url: str, *, headless: bool = True, timeout: int = 30) -> str:\n    \"\"\"\n    Scrape the visible text of a JavaScript-rendered webpage.\n\n    Launches a headless Chrome instance via undetected-chromedriver so that\n    sites protected by Cloudflare, Akamai, or similar bot-detection don't\n    block the request.  The browser fully renders the page (including JS),\n    waits for the <body> element, and returns its inner text.\n\n    Args:\n        url:      The webpage URL to scrape.\n        headless: Run Chrome without a visible window (default True).\n        timeout:  Max seconds to wait for the page to load.\n\n    Returns:\n        The visible text content of the page body.\n    \"\"\"\n    print(f\"Scraper: launching browser for {url}\")\n\n    options = uc.ChromeOptions()\n    options.page_load_strategy = \"eager\"\n    if headless:\n        options.add_argument(\"--headless=new\")\n    options.add_argument(\"--no-sandbox\")\n    options.add_argument(\"--disable-dev-shm-usage\")\n    options.add_argument(\"--disable-gpu\")\n    options.add_argument(\"--disable-extensions\")\n    options.add_argument(\n        \"--user-agent=Mozilla/5.0 (X11; Linux x86_64) \"\n        \"AppleWebKit/537.36 (KHTML, like Gecko) \"\n        \"Chrome/131.0.0.0 Safari/537.36\"\n    )\n\n    driver = uc.Chrome(options=options, use_subprocess=False, version_main=144)\n    driver.set_page_load_timeout(timeout)\n\n    try:\n        print(f\"Scraper: navigating to {url}\")\n        start = time.perf_counter()\n        try:\n            driver.get(url)\n        except Exception:\n            # Timeout on page load is expected for heavy sites; the body\n            # may still be available thanks to the 'eager' load strategy.\n            pass\n        elapsed = time.perf_counter() - start\n        print(f\"Scraper: page response received ({elapsed:.1f}s), waiting for DOM...\")\n\n        WebDriverWait(driver, 10).until(\n            EC.presence_of_element_located((By.TAG_NAME, \"body\"))\n        )\n        # SPA sites hydrate after body appears — wait until text is non-empty\n        WebDriverWait(driver, 20).until(\n            lambda d: len(d.find_element(By.TAG_NAME, \"body\").text.strip()) > 100\n        )\n\n        content = driver.find_element(By.TAG_NAME, \"body\").text\n    finally:\n        driver.quit()\n\n    word_count = len(content.split())\n    print(f\"Scraper: done — {word_count} words scraped from {url}\")\n\n    return content",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/ed-donner/agents/blob/3ec407e96c3467344d043403fa15f949f9fadff0/5_agent_frameworks/community_contributions/martinsawojide/job_cv_agent/website_scraper.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=undetected-chromedriver%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import undetected_chromedriver as uc\n\ndriver = uc.Chrome()\ntry:\n    driver.get(\"https://example.com\")\nfinally:\n    driver.quit()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/ultrafunkamsterdam/undetected-chromedriver/contents/undetected_chromedriver/__init__.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "__init__.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "stagehand",
          "name": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/browserbase/stagehand"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/stagehand"
            },
            {
              "label": "Docs",
              "href": "https://docs.stagehand.dev"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F220"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.stagehand.dev",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nimport os\nfrom stagehand import Stagehand, local_browser\n\nasync def main():\n    browser = await local_browser.launch(headless=True)\n    try:\n        client = await Stagehand.create(\n            browser=browser, model=\"openai/gpt-5.4-mini\",\n            model_api_key=os.environ[\"OPENAI_API_KEY\"],\n        )\n        try:\n            page = (await browser.context.pages())[0]\n            await page.goto(\"https://example.com\")\n        finally:\n            await client.close()\n    finally:\n        await browser.close()\n\nasyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/stagehand/4.4.0/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=stagehand%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "seleniumbase",
          "name": [
            {
              "t": "fact",
              "fact": "F226"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/seleniumbase/SeleniumBase"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/seleniumbase"
            },
            {
              "label": "Docs",
              "href": "https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from seleniumbase import SB\n\nwith SB() as browser:\n    browser.open(\"https://example.com\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/seleniumbase/4.58.1/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "method_summary.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=seleniumbase%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python browser automation library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#playwright",
          "label": [
            {
              "t": "text",
              "text": "Playwright"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits new automation across Chromium, Firefox, and WebKit with automatic waiting. "
        },
        {
          "t": "link",
          "href": "#selenium",
          "label": [
            {
              "t": "text",
              "text": "Selenium"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits teams with existing WebDriver suites or grid infrastructure. "
        },
        {
          "t": "link",
          "href": "#browser-use",
          "label": [
            {
              "t": "text",
              "text": "Browser Use"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits AI agents that operate a browser from natural-language tasks."
        }
      ]
    },
    {
      "q": "Playwright vs Selenium: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#playwright",
          "label": [
            {
              "t": "text",
              "text": "Playwright"
            }
          ]
        },
        {
          "t": "text",
          "text": " drives browsers through its own protocol and waits for elements automatically. "
        },
        {
          "t": "link",
          "href": "#selenium",
          "label": [
            {
              "t": "text",
              "text": "Selenium"
            }
          ]
        },
        {
          "t": "text",
          "text": " drives browsers through the WebDriver standard and supports remote grids of many browser versions."
        }
      ]
    },
    {
      "q": "What is Browser Use?",
      "a": [
        {
          "t": "link",
          "href": "#browser-use",
          "label": [
            {
              "t": "text",
              "text": "Browser Use"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a browser agent built on Pydantic AI that drives Chrome over the DevTools Protocol. The "
        },
        {
          "t": "link",
          "href": "#browser-use-sdk",
          "label": [
            {
              "t": "text",
              "text": "browser-use-sdk"
            }
          ]
        },
        {
          "t": "text",
          "text": " package calls the hosted Browser Use cloud API instead."
        }
      ]
    },
    {
      "q": "How do I use Selenium with Python?",
      "a": [
        {
          "t": "text",
          "text": "Install "
        },
        {
          "t": "link",
          "href": "#selenium",
          "label": [
            {
              "t": "text",
              "text": "Selenium"
            }
          ]
        },
        {
          "t": "text",
          "text": ", create a driver for a browser such as Chrome, and call its find and click methods on page elements. Selenium Manager downloads a matching browser driver automatically."
        }
      ]
    },
    {
      "q": "How do I use Playwright with Python?",
      "a": [
        {
          "t": "text",
          "text": "Install "
        },
        {
          "t": "link",
          "href": "#playwright",
          "label": [
            {
              "t": "text",
              "text": "Playwright"
            }
          ]
        },
        {
          "t": "text",
          "text": " and run its install command to download browser builds. Scripts then launch a browser, open a page, and act on locators through the sync or async API."
        }
      ]
    },
    {
      "q": "What is SeleniumBase?",
      "a": [
        {
          "t": "link",
          "href": "#seleniumbase",
          "label": [
            {
              "t": "text",
              "text": "SeleniumBase"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a framework on top of Selenium for web crawling, scraping, and testing. It integrates with pytest and adds its own helper methods."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, playwright",
      "display": "Playwright",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, playwright",
      "display": "129.4M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, playwright",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, playwright",
      "display": "1.65.2, Nov 2026",
      "asOf": "2026-11-14"
    },
    "F5": {
      "label": "Package release date, playwright",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F6": {
      "label": "Repository stars, playwright",
      "display": "15.1K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Executes JavaScript, playwright",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Uses CSS selectors, playwright",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Waits for elements, playwright",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Captures screenshots, playwright",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, playwright",
      "display": "PNG",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, playwright",
      "display": "pip install playwright && playwright install",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, playwright",
      "display": "Automates Chromium, Firefox, and WebKit through a shared Python API.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, playwright",
      "display": "Waits before acting on elements",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, playwright",
      "display": "Actions wait for the relevant element checks before running.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, playwright",
      "display": "Supports multiple browser engines",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, playwright",
      "display": "Automate Chromium, Firefox, and WebKit through the same library.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, playwright",
      "display": "Browser binaries track package versions",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, playwright",
      "display": "Install the browser binaries matching the Playwright package version.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, playwright",
      "display": "import asyncio\nfrom playwright.async_api import async_playwright\n\nasync def main():\n    async with async_playwright() as p:\n        for browser_type in [p.chromium, p.firefox, p.webkit]:\n            browser = await browser_type.launch()\n            page = await browser.new_page()\n            await page.goto('http://playwright.dev')\n            await page.screenshot(path=f'example-{browser_type.name}.png')\n            await browser.close()\n\nasyncio.run(main())\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, playwright",
      "display": "async def _create_browser_context(\n    self,\n    name: str,\n    context_kwargs: Optional[dict],\n    spider: Optional[Spider] = None,\n) -> BrowserContextWrapper:\n    \"\"\"Create a new context, also launching a local browser or connecting\n    to a remote one if necessary.\n    \"\"\"\n    acquired = False\n    if hasattr(self, \"context_semaphore\"):\n        await self.context_semaphore.acquire()\n        acquired = True\n    try:\n        context_kwargs = context_kwargs or {}\n        persistent = remote = False\n        if context_kwargs.get(PERSISTENT_CONTEXT_PATH_KEY):\n            context = await self.browser_provider.launch_persistent_context(context_kwargs)\n            persistent = True\n        else:\n            await self._maybe_launch_browser()\n            context = await self.browser.new_context(**context_kwargs)\n            remote = bool(self.config.cdp_url or self.config.connect_url)\n    except Exception:\n        if acquired:\n            self.context_semaphore.release()\n        raise\n\n    context.on(\n        \"close\", self._make_close_browser_context_callback(name, persistent, remote, spider)\n    )\n    self.stats.inc_value(\"playwright/context_count\")\n    self.stats.inc_value(f\"playwright/context_count/persistent/{persistent}\")\n    self.stats.inc_value(f\"playwright/context_count/remote/{remote}\")\n    logger.debug(\n        \"Browser context started: '%s' (persistent=%s, remote=%s)\",\n        name,\n        persistent,\n        remote,\n        extra={\n            \"spider\": spider,\n            \"context_name\": name,\n            \"persistent\": persistent,\n            \"remote\": remote,\n        },\n    )\n    if self.config.navigation_timeout_ms is not None:\n        context.set_default_navigation_timeout(self.config.navigation_timeout_ms)\n    self.context_wrappers[name] = BrowserContextWrapper(\n        context=context,\n        semaphore=asyncio.Semaphore(value=self.config.max_pages_per_context),\n        persistent=persistent,\n    )\n    self._set_stats_max_concurrent_context_count()\n    return self.context_wrappers[name]\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, playwright",
      "display": "handler.py · _create_browser_context()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, playwright",
      "display": "scrapy-plugins/scrapy-playwright",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, scrapy-plugins/scrapy-playwright",
      "display": "1.5K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, scrapy-plugins/scrapy-playwright",
      "display": "Nov 2026",
      "asOf": "2026-11-02"
    },
    "F26": {
      "label": "Library name, selenium",
      "display": "Selenium",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, selenium",
      "display": "29.7M",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "License, selenium",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, selenium",
      "display": "4.52.0, Oct 2026",
      "asOf": "2026-10-29"
    },
    "F30": {
      "label": "Package release date, selenium",
      "display": "Oct 2026",
      "asOf": "2026-10-29"
    },
    "F31": {
      "label": "Repository stars, selenium",
      "display": "34.6K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Executes JavaScript, selenium",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Uses CSS selectors, selenium",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Waits for elements, selenium",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Captures screenshots, selenium",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Output formats, selenium",
      "display": "PNG",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, selenium",
      "display": "pip install selenium",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, selenium",
      "display": "Automates browser interactions through WebDriver.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, selenium",
      "display": "Finds compatible drivers automatically",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, selenium",
      "display": "Selenium Manager finds the driver and downloads a browser when needed.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, selenium",
      "display": "Queues browser input actions",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, selenium",
      "display": "Queue pointer actions and run them together with perform.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, selenium",
      "display": "Mixed waits change timeout behavior",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, selenium",
      "display": "Mixing implicit and explicit waits produces unpredictable wait times.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Quickstart, selenium",
      "display": "from selenium import webdriver\nfrom selenium.webdriver.common.by import By\n\ndriver = webdriver.Chrome()\n\ndriver.get(\"https://www.selenium.dev/selenium/web/web-form.html\")\n\ntitle = driver.title\n\ndriver.implicitly_wait(0.5)\n\ntext_box = driver.find_element(by=By.NAME, value=\"my-text\")\nsubmit_button = driver.find_element(by=By.CSS_SELECTOR, value=\"button\")\n\ntext_box.send_keys(\"Selenium\")\nsubmit_button.click()\n\nmessage = driver.find_element(by=By.ID, value=\"message\")\ntext = message.text\n\ndriver.quit()\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function, selenium",
      "display": "def hover_element_and_double_click(\n    driver,\n    element,\n    click_selector,\n    click_by=\"css selector\",\n    timeout=settings.SMALL_TIMEOUT,\n):\n    _reconnect_if_disconnected(driver)\n    start_ms = time.time() * 1000.0\n    stop_ms = start_ms + (timeout * 1000.0)\n    hover = ActionChains(driver).move_to_element(element)\n    for x in range(int(timeout * 10)):\n        try:\n            hover.perform()\n            element_2 = driver.find_element(by=click_by, value=click_selector)\n            actions = ActionChains(driver)\n            actions.move_to_element(element_2)\n            actions.double_click(element_2)\n            actions.perform()\n            return element_2\n        except Exception:\n            now_ms = time.time() * 1000.0\n            if now_ms >= stop_ms:\n                break\n            time.sleep(0.1)\n    plural = \"s\"\n    if timeout == 1:\n        plural = \"\"\n    message = \"Element {%s} was not present after %s second%s!\" % (\n        click_selector,\n        timeout,\n        plural,\n    )\n    timeout_exception(NoSuchElementException, message)\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function reference, selenium",
      "display": "page_actions.py · hover_element_and_double_click()",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project repository, selenium",
      "display": "seleniumbase/SeleniumBase",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project stars, seleniumbase/SeleniumBase",
      "display": "13.3K",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project push date, seleniumbase/SeleniumBase",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F51": {
      "label": "Library name, splinter",
      "display": "Splinter",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Monthly downloads, splinter",
      "display": "285.4K",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "License, splinter",
      "display": "BSD",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Package release, splinter",
      "display": "0.21.0, Jan 2024",
      "asOf": "2024-01-16"
    },
    "F55": {
      "label": "Package release date, splinter",
      "display": "Jan 2024",
      "asOf": "2024-01-16"
    },
    "F56": {
      "label": "Repository stars, splinter",
      "display": "2.8K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Executes JavaScript, splinter",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Uses CSS selectors, splinter",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Waits for elements, splinter",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Captures screenshots, splinter",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, splinter",
      "display": "pip install 'splinter[selenium]'",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, splinter",
      "display": "Provides a common automation API over several browser and application-testing drivers.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, splinter",
      "display": "Shares an API across drivers",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, splinter",
      "display": "Use the same wrapper with Selenium or an application-testing driver.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, splinter",
      "display": "Closes context-managed browsers automatically",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, splinter",
      "display": "Use a with block to close the browser when the block ends.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, splinter",
      "display": "Features depend on the driver",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, splinter",
      "display": "Use a JavaScript-capable driver for script execution.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, splinter",
      "display": "Restricts newer Selenium versions",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, splinter",
      "display": "The Selenium extra imposes an upper version bound.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, splinter",
      "display": "from splinter import Browser\n\nbrowser = Browser('firefox')\nbrowser.visit('http://google.com')\nbrowser.find_by_name('q').fill('splinter - python acceptance testing for web applications')\nbrowser.find_by_name('btnK').click()\n\nif browser.is_text_present('splinter.readthedocs.io'):\n    print(\"Yes, the official website was found!\")\nelse:\n    print(\"No, it wasn't found... We need to improve our SEO techniques\")\n\nbrowser.quit()\n\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, splinter",
      "display": "def prepare_browser(request, parent, retry_count=3):\n    splinter_webdriver = request.getfixturevalue(\"splinter_webdriver\")\n    splinter_session_scoped_browser = request.getfixturevalue(\n        \"splinter_session_scoped_browser\"\n    )\n    splinter_close_browser = request.getfixturevalue(\"splinter_close_browser\")\n    browser_key = id(parent)\n    browser = browser_pool.get(browser_key)\n    if not splinter_session_scoped_browser:\n        browser = get_browser(splinter_webdriver)\n        if splinter_close_browser:\n            request.addfinalizer(browser.quit)\n    elif not browser:\n        browser = browser_pool[browser_key] = get_browser(splinter_webdriver)\n\n    if request.scope == \"function\":\n\n        def _take_screenshot_on_failure():\n            if splinter_make_screenshot_on_failure and getattr(\n                request.node, \"splinter_failure\", True\n            ):\n                _take_screenshot(\n                    request=request,\n                    fixture_name=parent.__name__,\n                    session_tmpdir=session_tmpdir,\n                    browser_instance=browser,\n                    splinter_screenshot_dir=splinter_screenshot_dir,\n                    splinter_screenshot_getter_html=splinter_screenshot_getter_html,\n                    splinter_screenshot_getter_png=splinter_screenshot_getter_png,\n                    splinter_screenshot_encoding=splinter_screenshot_encoding,\n                )\n\n        request.addfinalizer(_take_screenshot_on_failure)\n\n    try:\n        if splinter_webdriver not in browser.driver_name.lower():\n            raise IOError(f\"webdriver does not match (requested: {splinter_webdriver} \"\n                          f\", available: {browser.driver_name.lower()})\")\n        if hasattr(browser, \"driver\"):\n            browser.driver.implicitly_wait(splinter_selenium_implicit_wait)\n            browser.driver.set_speed(splinter_selenium_speed)\n            browser.driver.command_executor.set_timeout(\n                splinter_selenium_socket_timeout\n            )\n            browser.driver.command_executor._conn.timeout = (\n                splinter_selenium_socket_timeout\n            )\n            if splinter_window_size and splinter_webdriver != \"chrome\":\n                # Chrome cannot resize the window\n                # https://github.com/SeleniumHQ/selenium/issues/3508\n                browser.driver.set_window_size(*splinter_window_size)\n        try:\n            browser.cookies.delete()\n        except (IOError, HTTPException, WebDriverException):\n            LOGGER.warning(\"Error cleaning browser cookies\", exc_info=True)\n        for url in splinter_clean_cookies_urls:\n            browser.visit(url)\n            browser.cookies.delete()\n        if hasattr(browser, \"driver\"):\n            browser.visit_condition = splinter_browser_load_condition\n            browser.visit_condition_timeout = splinter_browser_load_timeout\n            browser.visit(\"about:blank\")\n    except (IOError, HTTPException, WebDriverException, MaxRetryError):\n        # we lost browser, try to restore the justice\n        try:\n            browser.quit()\n        except Exception:  # NOQA\n            pass\n        LOGGER.warning(\"Error preparing the browser\", exc_info=True)\n        if retry_count < 1:\n            raise\n        else:\n            browser = browser_pool[browser_key] = get_browser(splinter_webdriver)\n            prepare_browser(request, parent, retry_count - 1)\n    return browser\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, splinter",
      "display": "plugin.py · prepare_browser()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, splinter",
      "display": "pytest-dev/pytest-splinter",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, pytest-dev/pytest-splinter",
      "display": "254",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, pytest-dev/pytest-splinter",
      "display": "Jun 2023",
      "asOf": "2023-06-15"
    },
    "F77": {
      "label": "Library name, MechanicalSoup",
      "display": "MechanicalSoup",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, MechanicalSoup",
      "display": "128.2K",
      "asOf": "2026-11-16"
    },
    "F79": {
      "label": "License, MechanicalSoup",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, MechanicalSoup",
      "display": "1.4.0, May 2025",
      "asOf": "2025-05-30"
    },
    "F81": {
      "label": "Package release date, MechanicalSoup",
      "display": "May 2025",
      "asOf": "2025-05-30"
    },
    "F82": {
      "label": "Repository stars, MechanicalSoup",
      "display": "4.9K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Executes JavaScript, MechanicalSoup",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Uses CSS selectors, MechanicalSoup",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Install, MechanicalSoup",
      "display": "pip install MechanicalSoup",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "What it does, MechanicalSoup",
      "display": "Automates HTML website interaction through HTTP sessions and parsed forms.",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths lead, MechanicalSoup",
      "display": "Keeps cookies between requests",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths, MechanicalSoup",
      "display": "Cookies and redirects are handled automatically during navigation.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths lead, MechanicalSoup",
      "display": "Selects forms through CSS",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths, MechanicalSoup",
      "display": "Choose the form to fill with a CSS selector.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations lead, MechanicalSoup",
      "display": "Needs server-rendered HTML",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations, MechanicalSoup",
      "display": "Use a browser-driving library for pages that depend on JavaScript.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Quickstart, MechanicalSoup",
      "display": "import mechanicalsoup\n\n\nbrowser = mechanicalsoup.StatefulBrowser()\nbrowser.open(\"http://httpbin.org/\")\n\nprint(browser.url)\nbrowser.follow_link(\"forms\")\nprint(browser.url)\nprint(browser.page)\n\nbrowser.select_form('form[action=\"/post\"]')\nbrowser[\"custname\"] = \"Me\"\nbrowser[\"custtel\"] = \"00 00 0001\"\nbrowser[\"custemail\"] = \"nobody@example.com\"\nbrowser[\"size\"] = \"medium\"\nbrowser[\"topping\"] = \"onion\"\nbrowser[\"topping\"] = (\"bacon\", \"cheese\")\nbrowser[\"comments\"] = \"This pizza looks really good :-)\"\n\n# Uncomment to launch a real web browser on the current page.\n# browser.launch_browser()\n\n# Uncomment to display a summary of the filled-in form\n# browser.form.print_summary()\n\nresponse = browser.submit_selected()\nprint(response.text)\n",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Developer need",
      "display": "Automatic element checks",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Why choose playwright",
      "display": "waiting for element checks before browser actions",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Developer need in introduction",
      "display": "automatic element checks",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "When to consider selenium",
      "display": "Selenium Manager should handle the browser-driver setup",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need",
      "display": "Automatic driver setup",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose selenium",
      "display": "using Selenium Manager to find the required driver",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "automatic driver setup",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider playwright",
      "display": "automatic actionability checks should precede interactions",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "A shared driver wrapper",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose splinter",
      "display": "a common API across browser and application drivers",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "a shared driver wrapper",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need",
      "display": "Server-rendered HTML forms",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose MechanicalSoup",
      "display": "HTTP navigation with automatic cookie handling",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "server-rendered HTML forms",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "When to consider playwright",
      "display": "the page needs JavaScript and browser element checks",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Page introduction",
      "display": "Python browser automation libraries let developers automate browser interactions.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "FAQ: Which Python browser automation library should I choose?",
      "display": "Playwright waits for actionability checks before performing actions.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: Which Python browser automation library should I choose?",
      "display": "Selenium Manager resolves the browser driver automatically.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which Python browser automation library should I choose?",
      "display": "Splinter provides a shared automation interface across drivers.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Which Python browser automation library should I choose?",
      "display": "MechanicalSoup manages cookies and form interactions without JavaScript.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Does Playwright need a separate browser installation?",
      "display": "Install the browser binaries required by the selected Playwright version.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Does Selenium still require manual driver downloads?",
      "display": "Selenium Manager finds a matching driver and can download a browser when none is installed.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Should Selenium implicit and explicit waits be mixed?",
      "display": "Combining them can produce unpredictable wait times.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Can Playwright find elements by CSS selectors?",
      "display": "Playwright supports CSS locators.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Can Splinter execute JavaScript with every backend?",
      "display": "Script execution depends on the selected driver supporting it.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does Splinter close browsers created with a context manager?",
      "display": "A browser created in a with block closes when execution leaves that block.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Can the Splinter Selenium extra use an arbitrary current Selenium release?",
      "display": "The selected Splinter release declares an upper version bound on its Selenium extra.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Can MechanicalSoup automate a JavaScript-rendered application?",
      "display": "MechanicalSoup does not execute JavaScript.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can MechanicalSoup select a specific form through CSS?",
      "display": "select_form accepts a CSS selector or an existing BeautifulSoup tag.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "Library name, playwright",
      "display": "Playwright",
      "asOf": "2026-11-20"
    },
    "F124": {
      "label": "Monthly downloads, playwright",
      "display": "135.6M",
      "asOf": "2026-11-20"
    },
    "F125": {
      "label": "License, playwright",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Package release, playwright",
      "display": "1.65.2",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Package release date, playwright",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Install, playwright",
      "display": "python3.11 -m pip install playwright==1.65.2\npython3.11 -m playwright install chromium",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Quickstart, playwright",
      "display": "from playwright.sync_api import sync_playwright\n\nwith sync_playwright() as client:\n    browser = client.chromium.launch()\n    page = browser.new_page()\n    page.goto(\"https://example.com\")\n    browser.close()\n",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Synchronous entry point, playwright",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Hosted browser service required, playwright",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Control/execution model, playwright",
      "display": "Deterministic browser/context/page APIs with synchronous and asynchronous Python interfaces and multiple browser engines.",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Browser/runtime boundary, playwright",
      "display": "Chromium, Firefox, and WebKit with native local and server connection APIs.",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Project function, playwright",
      "display": "async def _create_browser_context(\n    self,\n    name: str,\n    context_kwargs: Optional[dict],\n    spider: Optional[Spider] = None,\n) -> BrowserContextWrapper:\n    \"\"\"Create a new context, also launching a local browser or connecting\n    to a remote one if necessary.\n    \"\"\"\n    acquired = False\n    if hasattr(self, \"context_semaphore\"):\n        await self.context_semaphore.acquire()\n        acquired = True\n    try:\n        context_kwargs = context_kwargs or {}\n        persistent = remote = False\n        if context_kwargs.get(PERSISTENT_CONTEXT_PATH_KEY):\n            context = await self.browser_provider.launch_persistent_context(context_kwargs)\n            persistent = True\n        else:\n            await self._maybe_launch_browser()\n            context = await self.browser.new_context(**context_kwargs)\n            remote = bool(self.config.cdp_url or self.config.connect_url)\n    except Exception:\n        if acquired:\n            self.context_semaphore.release()\n        raise\n\n    context.on(\n        \"close\", self._make_close_browser_context_callback(name, persistent, remote, spider)\n    )\n    self.stats.inc_value(\"playwright/context_count\")\n    self.stats.inc_value(f\"playwright/context_count/persistent/{persistent}\")\n    self.stats.inc_value(f\"playwright/context_count/remote/{remote}\")\n    logger.debug(\n        \"Browser context started: '%s' (persistent=%s, remote=%s)\",\n        name,\n        persistent,\n        remote,\n        extra={\n            \"spider\": spider,\n            \"context_name\": name,\n            \"persistent\": persistent,\n            \"remote\": remote,\n        },\n    )\n    if self.config.navigation_timeout_ms is not None:\n        context.set_default_navigation_timeout(self.config.navigation_timeout_ms)\n    self.context_wrappers[name] = BrowserContextWrapper(\n        context=context,\n        semaphore=asyncio.Semaphore(value=self.config.max_pages_per_context),\n        persistent=persistent,\n    )\n    self._set_stats_max_concurrent_context_count()\n    return self.context_wrappers[name]",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Project source file, playwright",
      "display": "scrapy_playwright/handler.py",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Project full_name, playwright",
      "display": "scrapy-plugins/scrapy-playwright",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Project stargazers_count, playwright",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Library name, selenium",
      "display": "Selenium",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Monthly downloads, selenium",
      "display": "30.4M",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "License, selenium",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Package release, selenium",
      "display": "4.53.0",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Package release date, selenium",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Install, selenium",
      "display": "python3.11 -m pip install selenium==4.53.0",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Quickstart, selenium",
      "display": "from selenium import webdriver\n\ndriver = webdriver.Chrome()\ntry:\n    driver.get(\"https://example.com\")\nfinally:\n    driver.quit()\n",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Synchronous entry point, selenium",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Hosted browser service required, selenium",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Control/execution model, selenium",
      "display": "WebDriver interoperability across browsers and remote Grid infrastructure, with explicit element and action-chain APIs.",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Browser/runtime boundary, selenium",
      "display": "Chrome, Edge, Firefox, Safari, WebKitGTK, WPEWebKit, and remote WebDriver are declared supported browser roles.",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project function, selenium",
      "display": "def hover_element_and_double_click(\n    driver,\n    element,\n    click_selector,\n    click_by=\"css selector\",\n    timeout=settings.SMALL_TIMEOUT,\n):\n    _reconnect_if_disconnected(driver)\n    start_ms = time.time() * 1000.0\n    stop_ms = start_ms + (timeout * 1000.0)\n    hover = ActionChains(driver).move_to_element(element)\n    for x in range(int(timeout * 10)):\n        try:\n            hover.perform()\n            element_2 = driver.find_element(by=click_by, value=click_selector)\n            actions = ActionChains(driver)\n            actions.move_to_element(element_2)\n            actions.double_click(element_2)\n            actions.perform()\n            return element_2\n        except Exception:\n            now_ms = time.time() * 1000.0\n            if now_ms >= stop_ms:\n                break\n            time.sleep(0.1)\n    plural = \"s\"\n    if timeout == 1:\n        plural = \"\"\n    message = \"Element {%s} was not present after %s second%s!\" % (\n        click_selector,\n        timeout,\n        plural,\n    )\n    timeout_exception(NoSuchElementException, message)",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project source file, selenium",
      "display": "seleniumbase/fixtures/page_actions.py",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Project full_name, selenium",
      "display": "seleniumbase/SeleniumBase",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Project stargazers_count, selenium",
      "display": "13.3K",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Library name, browser-use",
      "display": "Browser Use",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Monthly downloads, browser-use",
      "display": "7.3M",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "License, browser-use",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Package release, browser-use",
      "display": "1.0.6",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Package release date, browser-use",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Install, browser-use",
      "display": "python3.11 -m pip install browser-use==1.0.6",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Quickstart, browser-use",
      "display": "from browser_use import Agent\n\nresult = Agent(\"Open https://example.com and return its title\").run_sync()\nprint(result.final_result())\n",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Official description, browser-use",
      "display": "Runs a browser agent on Pydantic AI against cloud or local Chrome.",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Quickstart source file, browser-use",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Synchronous entry point, browser-use",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Hosted browser service required, browser-use",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Control/execution model, browser-use",
      "display": "Local Python agent with custom tools/model selection and local Chrome or cloud browsers;1.0 defaults to cloud browser plus gateway model, not local execution.",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Browser/runtime boundary, browser-use",
      "display": "Selected1.0.6 defaults to a cloud browser and bu-4.0 gateway model. Explicit Browser(chromium) or an attached Chrome mode changes execution to local; own compatible model setup is separate.",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Library name, browser-use-sdk",
      "display": "browser-use-sdk",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Monthly downloads, browser-use-sdk",
      "display": "6.0M",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "License, browser-use-sdk",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Package release, browser-use-sdk",
      "display": "3.12.1",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Package release date, browser-use-sdk",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Install, browser-use-sdk",
      "display": "python3.11 -m pip install browser-use-sdk==3.12.1",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Quickstart, browser-use-sdk",
      "display": "from browser_use_sdk.v4 import BrowserUse\n\nwith BrowserUse() as client:\n    created = client.runs.create(\"Open https://example.com and return its title\")\n    result = client.runs.wait_for_completion(created.id)\n    print(result.result)\n",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Official description, browser-use-sdk",
      "display": "Calls the Browser Use cloud API from Python.",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Quickstart source file, browser-use-sdk",
      "display": "browser-use-python/README.md",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Synchronous entry point, browser-use-sdk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Hosted browser service required, browser-use-sdk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Control/execution model, browser-use-sdk",
      "display": "Hosted agent-task client. Use explicit v4 namespace for new runs; the package top level still exposes maintained v2 for existing integrations. Infrastructure browser endpoints are separate from agent runs.",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Browser/runtime boundary, browser-use-sdk",
      "display": "Hosted agent runs and managed Chromium browser sessions. Use another CDP driver for direct page operations; closing a CDP connection does not stop the managed session.",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Library name, patchright",
      "display": "Patchright",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Monthly downloads, patchright",
      "display": "5.4M",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "License, patchright",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Package release, patchright",
      "display": "1.64.4",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Package release date, patchright",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Install, patchright",
      "display": "python3.11 -m pip install patchright==1.64.4\npython3.11 -m patchright install chromium",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart, patchright",
      "display": "from patchright.sync_api import sync_playwright\n\nwith sync_playwright() as client:\n    browser = client.chromium.launch()\n    page = browser.new_page()\n    page.goto(\"https://example.com\")\n    browser.close()\n",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Official description, patchright",
      "display": "Patches Playwright-compatible Chromium automation.",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Quickstart source file, patchright",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Synchronous entry point, patchright",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Hosted browser service required, patchright",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Control/execution model, patchright",
      "display": "Distinct patched Playwright-compatible Chromium product, with explicit evaluation-context control; Firefox/WebKit unsupported and console behavior differs. No universal anti-detection guarantee.",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Browser/runtime boundary, patchright",
      "display": "Only Chromium-based browsers. Firefox and WebKit are explicitly unsupported; package describes itself as a drop-in patched Playwright implementation.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project function, patchright",
      "display": "async def retrieve_console_messages(self, page: UndetectedPage) -> List[Dict]:\n    \"\"\"Retrieve captured console messages and errors from the page\"\"\"\n    messages = []\n\n    try:\n        # Get console messages\n        console_messages = await page.evaluate(\n            \"() => { const msgs = window.__capturedConsole || []; window.__capturedConsole = []; return msgs; }\",\n            isolated_context=False\n        )\n        messages.extend(console_messages)\n\n        # Get errors\n        errors = await page.evaluate(\n            \"() => { const errs = window.__capturedErrors || []; window.__capturedErrors = []; return errs; }\",\n            isolated_context=False\n        )\n        messages.extend(errors)\n\n        # Convert timestamps from JS to Python format\n        for msg in messages:\n            if 'timestamp' in msg and isinstance(msg['timestamp'], (int, float)):\n                msg['timestamp'] = msg['timestamp'] / 1000.0  # Convert from ms to seconds\n\n    except Exception:\n        # If retrieval fails, return empty list\n        pass\n\n    return messages",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project source file, patchright",
      "display": "crawl4ai/browser_adapter.py",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project full_name, patchright",
      "display": "unclecode/crawl4ai",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project stargazers_count, patchright",
      "display": "87.5K",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Library name, undetected-chromedriver",
      "display": "undetected-chromedriver",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Monthly downloads, undetected-chromedriver",
      "display": "2.7M",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "License, undetected-chromedriver",
      "display": "GPL-3.0",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Package release, undetected-chromedriver",
      "display": "3.5.5",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release date, undetected-chromedriver",
      "display": "Feb 2024",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Install, undetected-chromedriver",
      "display": "python3.11 -m pip install undetected-chromedriver==3.5.5",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart, undetected-chromedriver",
      "display": "import undetected_chromedriver as uc\n\ndriver = uc.Chrome()\ntry:\n    driver.get(\"https://example.com\")\nfinally:\n    driver.quit()\n",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Official description, undetected-chromedriver",
      "display": "Starts a patched Chromium driver that stays compatible with Selenium.",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Quickstart source file, undetected-chromedriver",
      "display": "__init__.py",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Synchronous entry point, undetected-chromedriver",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Hosted browser service required, undetected-chromedriver",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Control/execution model, undetected-chromedriver",
      "display": "Selenium-compatible Chromium startup/driver patches. Browser major, peer Selenium compatibility, and original example configuration matter; not a guaranteed anti-bot outcome.",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Browser/runtime boundary, undetected-chromedriver",
      "display": "Chrome/Chromium driver interface. The unchanged external workflow needs its hard-coded Chrome144 configuration; generic quickstart uses the SDK default detection.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project function, undetected-chromedriver",
      "display": "def fetch_js_website(url: str, *, headless: bool = True, timeout: int = 30) -> str:\n    \"\"\"\n    Scrape the visible text of a JavaScript-rendered webpage.\n\n    Launches a headless Chrome instance via undetected-chromedriver so that\n    sites protected by Cloudflare, Akamai, or similar bot-detection don't\n    block the request.  The browser fully renders the page (including JS),\n    waits for the <body> element, and returns its inner text.\n\n    Args:\n        url:      The webpage URL to scrape.\n        headless: Run Chrome without a visible window (default True).\n        timeout:  Max seconds to wait for the page to load.\n\n    Returns:\n        The visible text content of the page body.\n    \"\"\"\n    print(f\"Scraper: launching browser for {url}\")\n\n    options = uc.ChromeOptions()\n    options.page_load_strategy = \"eager\"\n    if headless:\n        options.add_argument(\"--headless=new\")\n    options.add_argument(\"--no-sandbox\")\n    options.add_argument(\"--disable-dev-shm-usage\")\n    options.add_argument(\"--disable-gpu\")\n    options.add_argument(\"--disable-extensions\")\n    options.add_argument(\n        \"--user-agent=Mozilla/5.0 (X11; Linux x86_64) \"\n        \"AppleWebKit/537.36 (KHTML, like Gecko) \"\n        \"Chrome/131.0.0.0 Safari/537.36\"\n    )\n\n    driver = uc.Chrome(options=options, use_subprocess=False, version_main=144)\n    driver.set_page_load_timeout(timeout)\n\n    try:\n        print(f\"Scraper: navigating to {url}\")\n        start = time.perf_counter()\n        try:\n            driver.get(url)\n        except Exception:\n            # Timeout on page load is expected for heavy sites; the body\n            # may still be available thanks to the 'eager' load strategy.\n            pass\n        elapsed = time.perf_counter() - start\n        print(f\"Scraper: page response received ({elapsed:.1f}s), waiting for DOM...\")\n\n        WebDriverWait(driver, 10).until(\n            EC.presence_of_element_located((By.TAG_NAME, \"body\"))\n        )\n        # SPA sites hydrate after body appears — wait until text is non-empty\n        WebDriverWait(driver, 20).until(\n            lambda d: len(d.find_element(By.TAG_NAME, \"body\").text.strip()) > 100\n        )\n\n        content = driver.find_element(By.TAG_NAME, \"body\").text\n    finally:\n        driver.quit()\n\n    word_count = len(content.split())\n    print(f\"Scraper: done — {word_count} words scraped from {url}\")\n\n    return content",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project source file, undetected-chromedriver",
      "display": "5_agent_frameworks/community_contributions/martinsawojide/job_cv_agent/website_scraper.py",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Project full_name, undetected-chromedriver",
      "display": "ed-donner/agents",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project stargazers_count, undetected-chromedriver",
      "display": "6.6K",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Library name, stagehand",
      "display": "Stagehand",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Monthly downloads, stagehand",
      "display": "1.8M",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "License, stagehand",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Package release, stagehand",
      "display": "4.4.0",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Package release date, stagehand",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Install, stagehand",
      "display": "python3.11 -m pip install stagehand==4.4.0",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Quickstart, stagehand",
      "display": "import asyncio\nimport os\nfrom stagehand import Stagehand, local_browser\n\nasync def main():\n    browser = await local_browser.launch(headless=True)\n    try:\n        client = await Stagehand.create(\n            browser=browser, model=\"openai/gpt-5.4-mini\",\n            model_api_key=os.environ[\"OPENAI_API_KEY\"],\n        )\n        try:\n            page = (await browser.context.pages())[0]\n            await page.goto(\"https://example.com\")\n        finally:\n            await client.close()\n    finally:\n        await browser.close()\n\nasyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Official description, stagehand",
      "display": "Builds browser agents on Browserbase.",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Quickstart source file, stagehand",
      "display": "packages/sdk-python/README.md",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Synchronous entry point, stagehand",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Hosted browser service required, stagehand",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Control/execution model, stagehand",
      "display": "Async Python browser driver plus model-driven act/observe/typed-extract APIs; local and Browserbase-owned browser handles have explicit cleanup order.",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Browser/runtime boundary, stagehand",
      "display": "Local launcher or managed Browserbase launch/connect browser handles; Stagehand owns its client session while the outer caller owns the browser handle.",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Library name, seleniumbase",
      "display": "SeleniumBase",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Monthly downloads, seleniumbase",
      "display": "1.2M",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "License, seleniumbase",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Package release, seleniumbase",
      "display": "4.58.1",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Package release date, seleniumbase",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Install, seleniumbase",
      "display": "python3.11 -m pip install seleniumbase==4.58.1",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Quickstart, seleniumbase",
      "display": "from seleniumbase import SB\n\nwith SB() as browser:\n    browser.open(\"https://example.com\")\n",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Official description, seleniumbase",
      "display": "Provides a framework for web crawling, scraping, and testing with pytest support.",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Quickstart source file, seleniumbase",
      "display": "help_docs/method_summary.md",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Synchronous entry point, seleniumbase",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Hosted browser service required, seleniumbase",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Control/execution model, seleniumbase",
      "display": "Procedural drivers and BaseCase end-to-end browser workflows with integrated assertions, waits, selectors, and optional CDP modes.",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Browser/runtime boundary, seleniumbase",
      "display": "Chrome is the published CLI default; Edge, Firefox, Safari, Opera, Brave, Comet, and Chromium switches are also documented. Host/browser/driver platform support still applies.",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python browser automation libraries Playwright Selenium Splinter MechanicalSoup examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
