HTTP downloader that fix wget issues
Inspired by lack of functionality of wget this tool solves two annoying issues
Okay, second problem easily solved like this
#!/bin/bash TMPFILE=$(mktemp -q) (wget -qO "$TMPFILE" "$1" && mv "$TMPFILE" "$2") || rm "$TMPFILE"
But what about first issue? It needs much more complicated shell-magic, introduces more troubles and requires additional HTTP request to target server.
$ pip install reget
As console tool:
$ reget http://example.org /tmp/example
will download server response to /tmp/example and create /tmp/example.json with headers needed for next run.
As python package
>>> import reget >>> reget.get('http://example.org', '/tmp/example') <Response > >>> reget.get('http://example.org', '/tmp/example') <Response >
Note that subsequent calls with the same url save_path arguments will respect 304 Not Modified.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|reget-0.5-py2.py3-none-any.whl (5.8 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Jul 20, 2015|
|reget-0.5.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 20, 2015|