Archiveis: simple Python wrapper for the archive.is capturing service

微信扫一扫,分享到朋友圈

Archiveis: simple Python wrapper for the archive.is capturing service

archiveis

A simple Python wrapper for the archive.is capturing service.

https://travis-ci.org/pastpages/archiveis https://coveralls.io/github/pastpages/archiveis?branch=master

Installation

$ pip install archiveis

Python Usage

Import it.

>>> import archiveis

Capture a URL.

>>> archive_url = archiveis.capture("http://www.example.com/")

See where it’s stored.

>>> print archive_url
http://archive.is/WxlRK

If a URL has been recently cached, archive.is may return the URL to that page rather than conduct a new capture.

Command-line usage

The Python library is also installed as a command-line interface. You can run it from your terminal like so:

$ archiveis http://www.example.com/

The command has the same options as the Python API, which you can learn about from its help output.

$ archiveis --help
Usage: archiveis [OPTIONS] URL

  Archives the provided URL using the archive.is capturing service.

Options:
  -ua, --user-agent TEXT  User-Agent header for the web request
  --help                  Show this message and exit.

微信扫一扫,分享到朋友圈

Archiveis: simple Python wrapper for the archive.is capturing service

Six squared & five squared

上一篇

The great content conundrum

下一篇

你也可能喜欢

Archiveis: simple Python wrapper for the archive.is capturing service

长按储存图像,分享给朋友