archive.is is a golang package for archiving web pages via archive.is.
Please be mindful and responsible and go easy on them, we want archive.is to last forever!
Created by Jay Taylor.
Also see: archive.org golang package
- Add timeout to 
.Capture. - Consider unifying to single binary
 
- Go version 1.9 or newer
 
go get jaytaylor.com/archive.is/...Archive a fresh new copy of an HTML page
Search for existing page snapshots
Search query examples:
microsoft.comfor snapshots from the host microsoft.com*.microsoft.comfor snapshots from microsoft.com and all its subdomains (e.g. www.microsoft.com)http://twitter.com/burgerkingfor snapshots from exact url (search is case-sensitive)http://twitter.com/burg*for snapshots from urls starting with http://twitter.com/burg
package main
import (
	"fmt"
	"github.com/jaytaylor/archive.is"
)
var captureURL = "https://jaytaylor.com/"
func main() {
	archiveURL, err := archiveis.Capture(captureURL)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Successfully archived %v via archive.is: %v\n", captureURL, archiveURL)
}
// Output:
//
// Successfully archived https://jaytaylor.com/ via archive.is: https://archive.is/i2PiWpackage main
import (
    "fmt"
    "time"
    "github.com/jaytaylor/archive.is"
)
var searchURL = "https://jaytaylor.com/"
func main() {
    snapshots, err := archiveis.Search(searchURL, 10*time.Second)
    if err != nil {
        panic(err)
    }
    fmt.Printf("%# v\n", snapshots)
}
// Output:
//
//go test ./...
Permissive MIT license, see the LICENSE file for more information.