table of contents
plowdown(1) | Plowshare for Bash 4 | plowdown(1) |
NAME¶
plowdown - Simple download manager for file sharing websites
SYNOPSIS¶
plowdown [OPTIONS]... [MODULE_OPTIONS]... URL|FILE...
DESCRIPTION¶
plowdown is a command-line tool designed for automatic download on file-sharing websites. It acts like a web browser, retrieving pages and filling HTML forms (including captchas).
OPTIONS¶
Common options¶
- -i, --interface=IFACE
- If your machine has several network interfaces, force using IFACE interface.
- -m, --mark-downloaded
- Mark downloaded links in (regular) file arguments.
- -o, --output-directory=DIRECTORY
- Directory where files will be saved. Default is current directory.
- -r, --max-retries=N
- Set maximum retries for download failures. Apply on module exit status: 3 (network error), 7 (captcha error). Default option value is 2 (i.e. 3 tries) and applies for one single URL download.
- -t, --timeout=SECS
- Cancel download after SECS seconds of waits. Apply on module exit status: 10 (temporary unavailable error). This error can be returned in various cases: unallowed parallel download, daily downloads limit reached, remote hoster overloaded. Default option value is disabled (no timeout, infinite) and applies for one single URL download.
- -x, --no-overwrite
- Do not overwrite existing files. Existing file will be preserved and filename will be suffixed with .1, .2, and so on. Default option value is disabled: files are overwritten (whatever their size) or resumed (if module supports it).
- --cache=METHOD
- Cache policy regarding module storage space. Each module is able to save data (credentials, authentication session, or tokens) in order to be reused later. Available values:
Example: Multiple links download using a premium account. If supported by module, login stage could be performed once.
Captcha options¶
- --9kweu=KEY
- Use 9kw.eu service to solve captchas.
- --antigate=KEY
- Use Antigate.com service to solve captchas.
- --captchabhood=USER:PASSWORD
- Use Captcha Brotherhood service to solve captchas.
- --captchacoin=KEY
- Use CaptchaCoin service to solve captchas.
- --deathbycaptcha=USER:PASSWORD
- Use Death by Captcha service to solve captchas.
- --captchamethod=METHOD
- Force specific captcha solving method (if unspecified it is autodetected). Available values:
- --captchaprogram=PROGRAM
- Call external program or script for solving captchas. Provided executable
can be located in PATH environment variable.
Three arguments are given:
Return value (on stdout) and exit status:
Note: plowdown legacy exit errors can also be returned, for example: 1 (fatal) or 3 (network).
Tuning settings¶
- --min-space=LIMIT
- Define threshold amount of available disk space before quitting plowdown. You must specify a suffix. Suffixes are:
- --max-rate=SPEED
- Limit download speed in bytes per second. Suffixes are:
- --min-rate=SPEED
- Limit download minimum speed in bytes per second (for a delay of 30 seconds). Suffixes are the same than --max-rate.
- --temp-directory=DIRECTORY
- Directory for temporary files: final link download, cookies, images, ...
- --temp-rename
- Append .part suffix to filename while file is being downloaded. Download resume will not work with this option.
- --skip-final
- Don't process final link (returned by module download function), just skip
it. This is applied for each input URL. If you are using this option, you
should need --run-after or --printf too.
Note: Depending hosters, final (generated) link may have restrictions: validity timeout (few hours), access limitation (usually one unique HTTP GET request for anonymous users), same IP address, etc.
- --run-before=PROGRAM
- Call external program or script before new link processing (before calling
module download function). Provided executable can be located in
PATH environment variable. Messages can be sent to stderr, stdout
is trashed.
Three arguments are given:
Exit status:
Note: Any other script exit status like 1 (fatal) or 3 (network) will be ignored (an error message will be reported).
- --run-after=PROGRAM
- Call external program or script after final link successful download.
Provided executable can be located in PATH environment variable.
Messages can be sent to stderr, stdout is trashed.
Five arguments are given:
Exit status:
Note: Any other (non zero) exit status will be ignored (an error message will be reported).
- --printf=FORMAT
- Print results (on stdout) in a given format (for each successful download). Default format string is "%F%n". Interpreted sequences are:
- %%
- raw % character
- %c
- final cookie filename (with output directory if specified). Name template is plowdown-cookies-NNNN.txt.
- %C
- %c or empty string if module does not require it
- %d
- download (final) url
- %D
- same as %d but url is escaped for JSON usage
- %f
- destination (local) filename
- %F
- destination (local) filename (with output directory if specified)
- %m
- module name
- %n
- newline
- %s
- destination (local) file size (positive integer in bytes). Important: Empty string is returned when --skip-final switch is specified.
- %t
- tabulation character
- %u
- download (source) url
- %U
- same as %u but url is escaped for JSON usage
Logging options¶
- -v, --verbose=LEVEL
- Set output verbosity level:
- -q, --quiet
- Alias for -v0. Do not print any debug messages.
Miscellaneous options¶
- --no-color
- Disables log messages (stderr only) output coloring.
- --fallback
- If no module is found for link, simply download it (HTTP GET).
- --no-curlrc
- Do not use curl config file (~/.curlrc).
- --curlrc=FILE
- Force using an alternate curl configuration file. Replaces ~/.curlrc if it exists. This option has no effect when --no-curlrc is defined.
- Do not consider any configuration file.
- --plowsharerc=FILE
- Force using an alternate configuration file (instead of per-user or systemwide plowshare.conf). This option has no effect when --no-plowsharerc is defined.
- --modules
- Display all supported module names (one per line) and exit. Useful for wrappers.
Generic program information¶
- -h, --help
- Display main help and exit.
- -H, --longhelp
- Display complete help (with module options) and exit.
- --version
- Output version information and exit.
MODULE OPTIONS¶
Common options¶
- -a, --auth=USER:PASSWORD
- Use premium account.
- -b, --auth-free=USER:PASSWORD
- Use free account.
- -p, --link-password=PASSWORD
- Used for password-protected files.
All switches are not implemented nor required for all modules. See long help message for detailed modules option list.
NOTES¶
Command line authentication string format¶
Complete login must have USER:PASSWORD format. The first semi-colon character is the separator. So, PASSWORD can contain a semi-colon character without any trouble.
FILES¶
- /etc/plowshare.conf
- Systemwide configuration file.
- ~/.config/plowshare/plowshare.conf
- This is the per-user configuration file.
The file format is described in plowshare.conf(5).
- ~/.config/plowshare/exec/
- Additional directory considered when searching for executable. See --captchaprogram, --run-before and --run-after switches.
- ~/.config/plowshare/modules.d/
- User directory considered when searching for modules at startup (plowdown will try to open ~/.config/plowshare/modules.d/*/config). One file per module (hoster).
- ~/.config/plowshare/storage/
- Directory used for storing data (one file per module) among sessions. See --cache=shared switch.
ENVIRONMENT VARIABLES¶
The following environment variables may affect plowdown:
- DISPLAY
- The X11 display server address is considered to display captchas. See --captchamethod=x11 documentation below.
- FRAMEBUFFER
- This variable is considered to display captchas. See --captchamethod=fb documentation below.
- HOME
- Search for user configuration directory in ~/.config/plowshare (see FILES section above). If found, ~/.curlrc will be used (use --no-curlrc to disable it).
- PLOWSHARE_CURL
- Specifies an alternate curl command ($PATH search is considered). If not defined, curl is used.
- PLOWSHARE_JS
- Specifies an alternate js command ($PATH search is considered). If not defined, js is used.
- XDG_CONFIG_HOME
- The directory to store user configuration files. If not defined, ~/.config is assumed.
EXIT CODES¶
Possible exit codes are:
- 0
- Success.
- 1
- Fatal error. Upstream site updated or unexpected result.
- 2
- No available module (provided URL is not supported).
- 3
- Network error. Mostly curl related.
- 4
- Authentication failed (bad login/password).
- 5
- Timeout reached (refer to -t/--timeout command-line option).
- 6
- Maximum tries reached (refer to -r/--max-retries command-line option).
- 7
- Captcha generic error.
- 8
- System generic error.
- 10
- Link alive but temporarily unavailable.
- 11
- Link alive but requires a password.
- 12
- Link alive but requires some authentication (private or premium link).
- 13
- Link is dead.
- 14
- Can't download link because file is too big (need permissions).
- 15
- Unknown command line parameter or incompatible options.
If plowdown is invoked with multiple links or link-list files and one or several errors occur, the first error code is returned added with 100.
AUTHORS¶
Plowshare was initially written by Arnau Sanchez. See the AUTHORS file for a list of some of the many other contributors.
Plowshare is (C) 2010-2017 The Plowshare Team
SEE ALSO¶
plowup(1), plowdel(1), plowlist(1), plowprobe(1), plowshare.conf(5), plowmod(1).
April 2, 2017 | GPL |