DuckDunk
Searching the web should be easy. DuckDunk provides dead simple DuckDuckGo querying for webpages and images.
Installation
Pip install coming soon.
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
results = duckdunk.image_search('cat')
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 will be very slow, and a purposely delayed. Sending multiple requests to DuckDuckGo will almost always fail. On top of that, too many of these problematic requests and DuckDuckGo will temporarily block the client. (A day or longer)
If you don't plan to make many requests, this delay can be removed. Just keep
in mind that I have had requests fail without a delay.:
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 will be slow.
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.7.0.tar.gz.
File metadata
- Download URL: duckdunk-0.7.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c616c13184815fa26053373d8dc29abcdc66df35e1fba6e6947e2abd37ea850
|
|
| MD5 |
5e8530e0ad04a4d621b8204e6f8ed375
|
|
| BLAKE2b-256 |
e8b1e6eaa4203ddc4239b37fd89bf0047b9f276d64147e436d16fb848cd2d112
|
File details
Details for the file duckdunk-0.7.0-py3-none-any.whl.
File metadata
- Download URL: duckdunk-0.7.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041e055de8fe85746e6bbf9f7c113d866ed6ed555026b23425822795defe19f4
|
|
| MD5 |
64ff6ad1c92544bfb012844180cad426
|
|
| BLAKE2b-256 |
6086262183572d279f5f72b4fb1c91b897b3357a4b378505adaabfe0de576ce8
|