DuckDunk
Searching the web should be easy. DuckDunk provides dead simple DuckDuckGo querying for webpages and images.
Installation
Easily install with pip through PyPI:
pip install duckdunk
Usage
Using site search results:
import duckdunk
# Searches with DuckDuckGo and returns the result list
results = duckdunk.web_search('cat facts')
# Obtain information such as the URL, title, and snippet from each result:
print(results[0].title)
print(results[0].url)
# If you just want to downlaod the page text:
print(results[0].text())
Using image search results:
import duckdunk
# Obtain images with metadata (title, source, thumbnail, original image, etc)
results = duckdunk.image_search('cat')
# Quickly view one of the results
img = results[0].download()
img.show()
About
There are a LOT of DuckDuckGo search packages for Python. However, they either lack support for features, or focus on a specific use case. Moreover, most of these packages are very old and outdated. The goal of this project is to bring a complete set of web search tools to Python, currently through the use of the DuckDuckGo search engine. Right now the aim is to support most essential DuckDuckGo features through a human-friendly library.
A word of warning
Requests are purposely delayed. Sending many simultaneous requests to DuckDuckGo will almost always fail. Too many of these problematic requests, and DuckDuckGo will temporarily block the client.
If you don't plan to make many requests, this delay can be removed:
duckdunk.web_search('cat facts', delay=0)
The downloads for image previews from Bing could probably be threaded safely, but for the time being they are downloaded one at a time.
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 duckdunk-0.12.0.tar.gz.
File metadata
- Download URL: duckdunk-0.12.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8279ffb722e4788b369d123df34b24bed101f5416396d780947b497e8f0be16
|
|
| MD5 |
6ba73b3f948dc584d338a6cd25e45bdd
|
|
| BLAKE2b-256 |
231753d9611ffc7a9f8851e9d4ff70160dcdc2fbc0e899037c5e5d10278ebc66
|
Provenance
The following attestation bundles were made for duckdunk-0.12.0.tar.gz:
Publisher:
python-publish.yml on Jumiranger/DuckDunk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckdunk-0.12.0.tar.gz -
Subject digest:
f8279ffb722e4788b369d123df34b24bed101f5416396d780947b497e8f0be16 - Sigstore transparency entry: 2557305792
- Sigstore integration time:
-
Permalink:
Jumiranger/DuckDunk@93295b4f5f9b86b1206382bc029898eb06f9642e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Jumiranger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@93295b4f5f9b86b1206382bc029898eb06f9642e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file duckdunk-0.12.0-py3-none-any.whl.
File metadata
- Download URL: duckdunk-0.12.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09ae81e5ab80069d94e020dd0d827488818e65573d51abd06985eef4abdf3e07
|
|
| MD5 |
60c360db908bade8395ae0b70124c762
|
|
| BLAKE2b-256 |
331fce1804e6ce6c8ce62649194884be54a86bdc2b9931d5a12878114d89da73
|
Provenance
The following attestation bundles were made for duckdunk-0.12.0-py3-none-any.whl:
Publisher:
python-publish.yml on Jumiranger/DuckDunk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckdunk-0.12.0-py3-none-any.whl -
Subject digest:
09ae81e5ab80069d94e020dd0d827488818e65573d51abd06985eef4abdf3e07 - Sigstore transparency entry: 2557305496
- Sigstore integration time:
-
Permalink:
Jumiranger/DuckDunk@93295b4f5f9b86b1206382bc029898eb06f9642e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Jumiranger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@93295b4f5f9b86b1206382bc029898eb06f9642e -
Trigger Event:
workflow_dispatch
-
Statement type: