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_KEYenvironment 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webquest-0.3.0.tar.gz.
File metadata
- Download URL: webquest-0.3.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c0059f27fcf8d9624567d6e2ba4483389ee7fa6d5b8f2032342bab9798c8e11
|
|
| MD5 |
3bff1bd9a84edc491931bdce5225d195
|
|
| BLAKE2b-256 |
fc5ba8068a8beabe38eb42de0fd320adca40980d0e406ece608c626c7d72beb2
|
File details
Details for the file webquest-0.3.0-py3-none-any.whl.
File metadata
- Download URL: webquest-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72598f6bc04653daf98ccef49a2362225c6536c2b4d487b76358f0ca69ea7b09
|
|
| MD5 |
deeb71bea33a7940e5be3b5f8ca498dc
|
|
| BLAKE2b-256 |
ab41f04d0e185fc82cf3b26d699f9e7f550f6f2648692ced6d82ea685c4adafb
|