Skip to main content

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

duckdunk-0.11.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

duckdunk-0.11.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file duckdunk-0.11.0.tar.gz.

File metadata

  • Download URL: duckdunk-0.11.0.tar.gz
  • Upload date:
  • Size: 6.7 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

Hashes for duckdunk-0.11.0.tar.gz
Algorithm Hash digest
SHA256 1ed65b0bedf36f90456c04c59ea61eac01d317a9d15c5b5716abec2dda7354a6
MD5 7b96400891093b1e340e977f467bfd3c
BLAKE2b-256 42e05d7b90e89bdf4f0e02c3226747cf5f7a820fa189cccbd2a9cc8c3af67b52

See more details on using hashes here.

File details

Details for the file duckdunk-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: duckdunk-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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

Hashes for duckdunk-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba92e68f5ca7b7846a91a5a93a10fddafb98a03f46cc2e8b3fc950f0bc2007b
MD5 7ae460330526b81c8212a770547a8ace
BLAKE2b-256 ad2e3ae76e1554d9ebcd18d4c40555a2e6842b28cf964416af5719594f1a86c4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.12.0

2 files

This release

0.11.0 This release

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

Supported by

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