https://github.com/wabarc/archive.is
A command-line tool and Go package for wayback web pages to archive.today
https://github.com/wabarc/archive.is
anticensorship archive archiveis archivetoday golang internet-archive internet-freedom memento no-more-404 tor wayback wayback-machine
Last synced: 16 days ago
JSON representation
A command-line tool and Go package for wayback web pages to archive.today
- Host: GitHub
- URL: https://github.com/wabarc/archive.is
- Owner: wabarc
- License: gpl-3.0
- Created: 2020-06-13T09:56:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-05-07T12:01:52.000Z (24 days ago)
- Last Synced: 2025-05-07T13:22:08.355Z (24 days ago)
- Topics: anticensorship, archive, archiveis, archivetoday, golang, internet-archive, internet-freedom, memento, no-more-404, tor, wayback, wayback-machine
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 40
- Watchers: 3
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Golang and Command-Line Interface to Archive.is
This package is a command-line tool named `archive.is` saving webpage to [archive.today](https://archive.today), it also supports imports as a Golang package for a programmatic. Please report all bugs and issues on [Github](https://github.com/wabarc/archive.is/issues).
## Installation
From source (^Go 1.12):
```sh
go get github.com/wabarc/archive.is
```From [gobinaries.com](https://gobinaries.com):
```sh
curl -sf https://gobinaries.com/wabarc/archive.is/cmd/archive.is | sh
```From [releases](https://github.com/wabarc/archive.is/releases)
## Usage
### Command-line
```sh
$ archive.is https://www.google.com https://www.bbc.comOutput:
version: 0.0.1
date: unknownhttps://www.google.com => https://archive.li/JYVMT
https://www.bbc.com => https://archive.li/HjqQV
```### Go package interfaces
```go
package mainimport (
"fmt""github.com/wabarc/archive.is/pkg"
)func main() {
links := []string{"https://www.google.com", "https://www.bbc.com"}
arc := &is.Archiver{}
got, _ := arc.Wayback(links)
for orig, dest := range got {
fmt.Println(orig, "=>", dest)
}
}// Output:
// https://www.google.com => https://archive.li/JYVMT
// https://www.bbc.com => https://archive.li/HjqQV
```### Access Tor Hidden Service
[archive.today](https://archive.today) providing [Tor Hidden Service](http://archivecaslytosk.onion/) to saving webpage, and it's preferred to access
Tor Hidden Service, access if Tor Hidden Service is unavailable.By default, the program will dial a proxy using tor socks port `127.0.0.1:9050`,
use `TOR_HOST` and `TOR_SOCKS_PORT` specified a different host and portIt'll look up tor executable file if dial socks proxy failed, and start it to dial proxy.
## FAQ
### archive.today is unavailable?
Archive.today may have enforced a strictly CAPTCHA policy, causing an exception to the request.
Solve:
Find `cf_clearance` item from cookies, and set as system environmental variable `ARCHIVE_COOKIE`,
such as `ARCHIVE_COOKIE=cf_clearance=ab170e4acc49bbnsaff8687212d2cdb987e5b798-1234542375-KDUKCHU`## License
This software is released under the terms of the GNU General Public License v3.0. See the [LICENSE](https://github.com/wabarc/archive.is/blob/main/LICENSE) file for details.