Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (45 sloc) 2.8 KB

Accessing existing archives

The Internet Archive's The Wayback Machine

A page saved by the Internet Archive's excellent Wayback Machine can be integrated by passing its URL to :py:func:`storytracker.open_wayback_machine_url`.

This pulls down the CNN homepage captured on Sept. 11, 2001.

>>> import storytracker
>>> obj = storytracker.open_wayback_machine_url('')

Now you have an :py:class:`ArchivedURL` object like any other in the storytracker system.

>>> obj
<ArchivedURL: 21:38:14>

So, if for instance you wanted to see all the images on the page you could do this.

>>> for i in obj.images:
>>>     print i.src

A screenshot with corresponding HTML archived by can be pulled in by passing the URL from its screenshot detail page to :py:func:`storytracker.open_pastpages_url`.

>>> storytracker.open_pastpages_url("")
<ArchivedURL: 05:05:50.761287>