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
Release history Release notifications | RSS feed
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 downloader-0.96.zip.
File metadata
- Download URL: downloader-0.96.zip
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ac1a58f84236d3d8955aee11f3fef0ecaccc1239d0e94cd88382adb23836cff
|
|
| MD5 |
ceb4219dbb724de05b0b3c83e77379fc
|
|
| BLAKE2b-256 |
d6fa0617cdf06251611fac8f3af854090eaf2a4623abced2e5ecd212d91a9e78
|
File details
Details for the file downloader-0.96.win32.exe.
File metadata
- Download URL: downloader-0.96.win32.exe
- Upload date:
- Size: 202.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9923229f1a71fd80efd531ae5376fe4582c09b0c0abc68b8d09da4bd2a56e678
|
|
| MD5 |
e3852bbee576bf50758207676194dd20
|
|
| BLAKE2b-256 |
b2002b15233255e7ce2a3ed237331b5d2916fa5a39a1dce0b0990a09f02fda42
|