Skip to main content

Download URLs using a compressed disk cache and a random throttling interval.

Project description

Each Downloader maintains an sqlite3-based disk cache that utilizes zlib

compression. Network requests are only made if the cached version of the resource has an age larger or equal to the stale_after value provided by the programmer.

Between network requests a throttling interval needs to elapse. This throttling interval is randomly chosen, but lies within the throttle_bounds defined by the programmer.

HTML resources can be parsed using lxml and in this case an lxml ElementTree is returned instead of a file object, with the links rewritten to be absolute in order to facilitate following them. The parsing is done leniently in order to not fail when invalid HTML is encountered.

The programmer can also supply a function that decides whether the server has banned the client (possibly by examining the returned resource). In this case an exception will be raised.

Downloader’s features make it ideal for writing scrapers, as it can keep its network footprint small (due to the cache) and irregular (due to the random throttling interval).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

downloader-0.95.zip (6.6 kB view details)

Uploaded Source

Built Distribution

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

downloader-0.95.win32.exe (202.3 kB view details)

Uploaded Source

File details

Details for the file downloader-0.95.zip.

File metadata

  • Download URL: downloader-0.95.zip
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for downloader-0.95.zip
Algorithm Hash digest
SHA256 8452a4c5d4e1cca28cfdccf44957b7c3afffb450f03c5be61fa699ffeb54e943
MD5 501fedad43da57898b6c0856054fbe46
BLAKE2b-256 dba1218a047470e543bfb0631bbbd55d5ba507fa85d8503985348e1a918270ea

See more details on using hashes here.

File details

Details for the file downloader-0.95.win32.exe.

File metadata

  • Download URL: downloader-0.95.win32.exe
  • Upload date:
  • Size: 202.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for downloader-0.95.win32.exe
Algorithm Hash digest
SHA256 4db2c560b65a390e29a907493c692d5f3a5bde34faa097c7fdc560591b325ded
MD5 f82fb95d04c4bd67f1437b2751263f53
BLAKE2b-256 65ccea2d24e6dd018827c1328aa637d582a66681583feb45556a9f799c6b1991

See more details on using hashes here.

Supported by

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