From 30ae1c952aa63aeaefbb4606de166583f494a827 Mon Sep 17 00:00:00 2001 From: Pasha Dudka Date: Wed, 25 Jun 2025 11:27:20 -0700 Subject: [PATCH] Rename external browser -> remote browser --- README.md | 2 +- .../README.md | 8 ++++---- .../{use-external-browser => use-remote-browser}/main.js | 6 +++--- examples/python/use_existing_browser/main.py | 4 ++-- .../README.md | 8 ++++---- .../{use_external_browser => use_remote_browser}/main.py | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) rename examples/js/{use-external-browser => use-remote-browser}/README.md (68%) rename examples/js/{use-external-browser => use-remote-browser}/main.js (90%) rename examples/python/{use_external_browser => use_remote_browser}/README.md (69%) rename examples/python/{use_external_browser => use_remote_browser}/main.py (91%) diff --git a/README.md b/README.md index 6436a04f..b47f05d6 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ AgentQL is a suite of tools for extracting data and automating workflows on live | Compare Product Prices | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/compare_product_prices) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/compare_product_prices) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/compare-product-prices) | | Get Element by Prompt | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/get_by_prompt) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/get-by-prompt) | | Infinite Scroll | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/infinite_scroll) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/infinite_scroll) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/infinite-scroll) | -| Use External Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_external_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-external-browser) | +| Use Remote Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_remote_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-remote-browser) | | Use Existing Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_existing_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-existing-browser) | | Query List Items | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/list_query_usage) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/list-query-usage) | | Site Login | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/log_into_sites) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/log_into_sites) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/log-into-sites) | diff --git a/examples/js/use-external-browser/README.md b/examples/js/use-remote-browser/README.md similarity index 68% rename from examples/js/use-external-browser/README.md rename to examples/js/use-remote-browser/README.md index 3c02a090..80c30b1b 100644 --- a/examples/js/use-external-browser/README.md +++ b/examples/js/use-remote-browser/README.md @@ -1,12 +1,12 @@ --- -title: Use external browser for AgentQL queries +title: Use remote browser for AgentQL queries description: Browser is hosted remotely - you connect to it over CDP. updated: 2025-06-24 --- -# Example script: Use external browser with AgentQL +# Example script: Use remote browser with AgentQL -This example demonstrates how to use external browser with AgentQL. +This example demonstrates how to use remote browser with AgentQL. ## Run the script @@ -18,7 +18,7 @@ This example demonstrates how to use external browser with AgentQL. node main.js ``` -Script will take care of allocating AgentQL External Browser, connecting to it and running the AgentQL query. +Script will take care of allocating AgentQL Remote Browser, connecting to it and running the AgentQL query. ## Play with the query diff --git a/examples/js/use-external-browser/main.js b/examples/js/use-remote-browser/main.js similarity index 90% rename from examples/js/use-external-browser/main.js rename to examples/js/use-remote-browser/main.js index 0128919f..b7ed7da2 100644 --- a/examples/js/use-external-browser/main.js +++ b/examples/js/use-remote-browser/main.js @@ -1,5 +1,5 @@ /** - * This example demonstrates how to interact with an external browser with AgentQL. + * This example demonstrates how to interact with an remote browser with AgentQL. */ import { wrap } from 'agentql'; import { UserAgentPreset, createBrowserSession } from 'agentql/tools'; @@ -28,7 +28,7 @@ async function getRemoteBrowserUrl() { return cdpUrl; } -async function runInExternalBrowser() { +async function runInRemoteBrowser() { // This function demonstrates how to open and interact with a new page using remote browser const browserUrl = await getRemoteBrowserUrl(); @@ -55,4 +55,4 @@ async function runInExternalBrowser() { await browser.close(); } -runInExternalBrowser().catch(console.error); +runInRemoteBrowser().catch(console.error); diff --git a/examples/python/use_existing_browser/main.py b/examples/python/use_existing_browser/main.py index 98996ad1..cfb9e13a 100644 --- a/examples/python/use_existing_browser/main.py +++ b/examples/python/use_existing_browser/main.py @@ -1,9 +1,9 @@ -"""This example demonstrates how to interact with an external or existing browser with AgentQL.""" +"""This example demonstrates how to interact with an existing browser with AgentQL.""" import agentql from playwright.sync_api import sync_playwright -# The URL of the external or existing browser you wish to connect. +# The URL of the existing browser you wish to connect. WEBSOCKET_URL = "http://localhost:9222" URL = "https://scrapeme.live/shop" diff --git a/examples/python/use_external_browser/README.md b/examples/python/use_remote_browser/README.md similarity index 69% rename from examples/python/use_external_browser/README.md rename to examples/python/use_remote_browser/README.md index c43ea1d7..8d8bb990 100644 --- a/examples/python/use_external_browser/README.md +++ b/examples/python/use_remote_browser/README.md @@ -1,12 +1,12 @@ --- -title: Use external browser with AgentQL +title: Use remote browser with AgentQL description: Browser is hosted remotely - you connect to it over CDP. updated: 2025-06-24 --- -# Example script: Use external browser with AgentQL +# Example script: Use remote browser with AgentQL -This example demonstrates how to use external browser with AgentQL. +This example demonstrates how to use remote browser with AgentQL. ## Run the script @@ -18,7 +18,7 @@ This example demonstrates how to use external browser with AgentQL. python3 main.py ``` -Script will take care of allocating AgentQL External Browser, connecting to it and running the AgentQL query. +Script will take care of allocating AgentQL Remote Browser, connecting to it and running the AgentQL query. ## Play with the query diff --git a/examples/python/use_external_browser/main.py b/examples/python/use_remote_browser/main.py similarity index 91% rename from examples/python/use_external_browser/main.py rename to examples/python/use_remote_browser/main.py index dfb06291..00e0d04e 100644 --- a/examples/python/use_external_browser/main.py +++ b/examples/python/use_remote_browser/main.py @@ -1,4 +1,4 @@ -"""This example demonstrates how to interact with an external browser with AgentQL.""" +"""This example demonstrates how to interact with an remote browser with AgentQL.""" import asyncio @@ -31,7 +31,7 @@ async def get_remote_browser_url() -> str: return cdp_url -async def run_in_external_browser(): +async def run_in_remote_browser(): """This function demonstrates how to open and interact with a new page using remote browser.""" browser_url = await get_remote_browser_url() async with async_playwright() as p: @@ -58,4 +58,4 @@ async def run_in_external_browser(): if __name__ == "__main__": - asyncio.run(run_in_external_browser()) + asyncio.run(run_in_remote_browser())