|
| 1 | +# archive wayback downloader |
| 2 | + |
| 3 | +[](https://pypi.org/project/pywaybackup/) |
| 4 | +[](https://pypi.org/project/pywaybackup/) |
| 5 | + |
| 6 | + |
| 7 | +[](https://opensource.org/licenses/MIT) |
| 8 | + |
| 9 | +Downloading archived web pages from the [Wayback Machine](https://archive.org/web/). |
| 10 | + |
| 11 | +Internet-archive is a nice source for several OSINT-information. This script is a work in progress to query and fetch archived web pages. |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +### Pip |
| 16 | + |
| 17 | +1. Install the package <br> |
| 18 | + ```pip install pywaybackup``` |
| 19 | +2. Run the script <br> |
| 20 | + ```waybackup -h``` |
| 21 | + |
| 22 | +### Manual |
| 23 | + |
| 24 | +1. Clone the repository <br> |
| 25 | + ```git clone https://github.com/bitdruid/waybackup.git``` |
| 26 | +2. Install <br> |
| 27 | + ```pip install .``` |
| 28 | + - in a virtual env or use `--break-system-package` |
| 29 | + |
| 30 | +## Usage |
| 31 | + |
| 32 | +This script allows you to download content from the Wayback Machine (archive.org). You can use it to download either the latest version or all versions of web page snapshots within a specified range. |
| 33 | + |
| 34 | +### Arguments |
| 35 | + |
| 36 | +- `-h`, `--help`: Show the help message and exit. |
| 37 | +- `-v`, `--version`: Show the script's version. |
| 38 | + |
| 39 | +#### Required Arguments |
| 40 | + |
| 41 | +- `-u URL`, `--url URL`: The URL of the web page to download. This argument is required. |
| 42 | + |
| 43 | +#### Mode Selection (Choose One) |
| 44 | + |
| 45 | +- `-c`, `--current`: Download the latest version of each file snapshot. This option is mutually exclusive with `-f/--full`. |
| 46 | +- `-f`, `--full`: Download snapshots of all timestamps. This option is mutually exclusive with `-c/--current`. |
| 47 | + |
| 48 | +#### Optional Arguments |
| 49 | + |
| 50 | +- `-l`, `--list`: Only print the snapshots available within the specified range. Does not download the snapshots. |
| 51 | +- `-r RANGE`, `--range RANGE`: Specify the range in years for which to search and download snapshots. |
| 52 | +- `-o OUTPUT`, `--output OUTPUT`: The folder where downloaded files will be saved. |
| 53 | + |
| 54 | +#### Additional |
| 55 | + |
| 56 | +- `--retry [RETRY_FAILED]`: Retry failed downloads. You can specify the number of retry attempts as an integer. If no number is provided, the script will keep retrying indefinitely. |
| 57 | +- `--worker [AMOUNT]`: The number of worker to use for downloading (simultaneous downloads). Default is 1. Beware: Using too many worker will lead into refused connections from the Wayback Machine. Duration about 1.5 minutes. |
| 58 | + |
| 59 | +### Examples |
| 60 | + |
| 61 | +Download latest snapshot of all files:<br> |
| 62 | +`waybackup -u http://example.com -c` |
| 63 | + |
| 64 | +Download latest snapshot of all files with retries:<br> |
| 65 | +`waybackup -u http://example.com -c --retry 3` |
| 66 | + |
| 67 | +Download all snapshots sorted per timestamp with a specified range:<br> |
| 68 | +`waybackup -u http://example.com -f -r 5` |
| 69 | + |
| 70 | +Download all snapshots sorted per timestamp with a specified range and save to a specified folder with 3 worker:<br> |
| 71 | +`waybackup -u http://example.com -f -r 5 -o /home/user/Downloads/snapshots --worker 3` |
| 72 | + |
| 73 | +List available snapshots per timestamp without downloading:<br> |
| 74 | +`waybackup -u http://example.com -f -l` |
| 75 | + |
| 76 | +## Contributing |
| 77 | + |
| 78 | +I'm always happy for some feature requests to improve the usability of this script. |
| 79 | +Feel free to give suggestions and report issues. Project is still far from being perfect. |
0 commit comments