wayback-machine
Internet Wayback Machine Client
Last updated 4 years ago by macbre .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install wayback-machine 
SYNC missed versions from official npm registry.

wayback-machine

NPM version Build Status

Internet Wayback Machine Client

API

getTimeline

Docs

Get the timeline with all the snapshots (mementos) of a given URL taken by http://web.archive.org

var wayback = require('wayback-machine');

wayback.getTimeline(url, function(err, timeline) {
  if (err) {
    console.error(err);
    return;
  }

  console.log('Timeline for <%s>:', url);
  console.log(timeline);
});

Timeline example:

{ original: 'http://macbre.net',
  timegate: 'http://web.archive.org/web/http://macbre.net',
  first: 
   { url: 'http://web.archive.org/web/20080529061028/http://macbre.net/',
     time: Thu May 29 2008 08:10:28 GMT+0200 (CEST) },
  last: 
   { url: 'http://web.archive.org/web/20150801212811/http://macbre.net/',
     time: Sat Aug 01 2015 23:28:11 GMT+0200 (CEST) },
  mementos: 
   [ { url: 'http://web.archive.org/web/20080529061028/http://macbre.net/',
       time: Thu May 29 2008 08:10:28 GMT+0200 (CEST) },
     { url: 'http://web.archive.org/web/20080701120010/http://macbre.net/',
       time: Tue Jul 01 2008 14:00:10 GMT+0200 (CEST) },
     { url: 'http://web.archive.org/web/20080702181112/http://macbre.net/',
       time: Wed Jul 02 2008 20:11:12 GMT+0200 (CEST) },
       ...
     { url: 'http://web.archive.org/web/20150801212811/http://macbre.net/',
       time: Sat Aug 01 2015 23:28:11 GMT+0200 (CEST) } ] }

getClosest

Docs

Get the latest URL snapshot using Wayback Availability JSON API

var wayback = require('wayback-machine');

wayback.getClosest(url, function(err, closest) {
  if (err) {
    console.error(err);
    return;
  }

  console.log('The closest snapshot for <%s>:', url);
  console.log(closest);
});

Closest example:

{ available: true,
  url: 'http://web.archive.org/web/20111008092403/http://macbre.net:80/',
  timestamp: '20111008092403',
  status: '200' }

Current Tags

  • 0.2.1                                ...           latest (4 years ago)

3 Versions

  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (3)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |