Skip to content

v3.1.0 — DuckDuckGo engine, atomic writes, reliability fixes

Choose a tag to compare

@KTS-o7 KTS-o7 released this 04 Jun 10:02
· 15 commits to main since this release

Highlights

New: DuckDuckGo image search engine

A second search engine that works without Selenium, no API key, no rate-limit token beyond a short-lived cookie. Switch via:

from better_bing_image_downloader import downloader
downloader("puppies", limit=100, engine="duckduckgo")
bbid puppies --limit 100 --engine duckduckgo

DuckDuckGo requires the brotli package: pip install "better-bing-image-downloader[duckduckgo]"

Reliability fixes

  • Atomic file writes in bing.save_image — no more corrupt files when downloads are interrupted mid-write
  • Per-future timeout on parallel downloads (180s cap) — stalled connections no longer block the whole batch
  • Exponential backoff on Bing network errors (2s → 4s → ... → 60s) with a clean stop when a page yields no new images
  • helperdownload uses logging instead of print() — no more stdout pollution when used as a library

Deprecation

The Selenium-based multidownloader CLI is deprecated and will be removed in v4.0.0. The Google path no longer works (Google serves a JS-only shell to automated requests); the Bing path is superseded by the new bbid CLI.

Tests

41 → 72 tests passing. New coverage: atomic write, parallel-future timeout, DuckDuckGo engine (init, vqd, page parsing, brotli, run-time pagination, badsite/seen filtering, empty-page termination), engine dispatch, deprecation markers.

Installation

pip install --upgrade better-bing-image-downloader
# or, for DuckDuckGo support:
pip install --upgrade "better-bing-image-downloader[duckduckgo]"

See CHANGELOG.md for the full list of changes.