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, DuckDuckGoSearchRequest


async def main() -> None:
    runner = Hyperbrowser()
    scraper = DuckDuckGoSearch()
    response = await runner.run(
        scraper,
        DuckDuckGoSearchRequest(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, DuckDuckGoSearchRequest


async def main() -> None:
    runner = Hyperbrowser()
    scraper = DuckDuckGoSearch()
    responses = await runner.run_multiple(
        scraper,
        [
            DuckDuckGoSearchRequest(query="Pizza Toppings"),
            DuckDuckGoSearchRequest(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.2.0.tar.gz (6.8 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.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for webquest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9f6e5a5b07278412450480b70ccb2ba28c9d4a8a33019c7657ca3d2df2b73d05
MD5 a08f87b5f541c110e176590e50fc0bd0
BLAKE2b-256 edd291b45ec24d6aa460786c765af190601115fb1038f081cb1225e99cfbc98b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for webquest-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89b7aba5d39b9929ff6527cedfd9f2fd1816b703ad0b8cbc6805f05eec8144e4
MD5 ee6c6dd7671fcc43c7ee871d97bdc601
BLAKE2b-256 30f4c5fee7cc40ae520afe4a6ddde0148281adc6df1dac1cb7417c9624d47768

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