Skip to main content

WebQuest is an extensible Python toolkit for high-level web scraping, built around a generic Playwright-based scraper interface for quickly building, running, and reusing custom scrapers.

Project description

WebQuest

WebQuest is an extensible Python toolkit for high-level web scraping, built around a generic Playwright-based scraper interface for quickly building, running, and reusing custom scrapers.

Scrapers:

  • Any Article
  • DuckDuckGo Search
  • Google News Search
  • YouTube Search
  • YouTube Transcript

Runners:

  • Hyperbrowser

Installation

Installing using pip:

pip install webquest

Installing using uv:

uv add webquest

Usage

Example usage of the DuckDuckGo Search scraper:

import asyncio

from webquest.runners import Hyperbrowser
from webquest.scrapers import DuckDuckGoSearch


async def main() -> None:
    runner = Hyperbrowser()
    scraper = DuckDuckGoSearch()
    response = await runner.run(
        scraper,
        scraper.Request(query="Pizza Toppings"),
    )
    print(response.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

To use the Hyperbrowser runner, you need to set the HYPERBROWSER_API_KEY environment variable.

You can also run multiple requests at the same time:

import asyncio

from webquest.runners import Hyperbrowser
from webquest.scrapers import DuckDuckGoSearch


async def main() -> None:
    runner = Hyperbrowser()
    scraper = DuckDuckGoSearch()
    responses = await runner.run_multiple(
        scraper,
        [
            scraper.Request(query="Pizza Toppings"),
            scraper.Request(query="AI News"),
        ],
    )
    for response in responses:
        print(response.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webquest-0.4.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webquest-0.4.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file webquest-0.4.0.tar.gz.

File metadata

  • Download URL: webquest-0.4.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.1

File hashes

Hashes for webquest-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e2c87079e329faebc6d8c9a0417af10a6c7f243eb189b35c4259b94106d078d4
MD5 92b9febcce5bae8b189f8b449442a937
BLAKE2b-256 ea701613eab5cc595979ee2078e9c8dd4dde1f39338c34678e7248ae93dcc4a6

See more details on using hashes here.

File details

Details for the file webquest-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: webquest-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.1

File hashes

Hashes for webquest-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 367a3918b65cb8abe9abfe0a9cadc10d99b0f5708fa23422cb71cfe6ae5c0967
MD5 ab7bd75c4134e6c37a67c04dd13442dd
BLAKE2b-256 18fc8662878e095423eeed803a1877ad69a83367e568ced55aaec16cc2ecd8ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page