wabarc / archive.is Goto Github PK
View Code? Open in Web Editor NEWA command-line tool and Go package for wayback web pages to archive.today
License: GNU General Public License v3.0
A command-line tool and Go package for wayback web pages to archive.today
License: GNU General Public License v3.0
$ export ARCHIVE_COOKIE=cf_clearance=747c8285c60f3297fb1d52e89228f043a56af6bf-1652837033-TKBSOLBK
$ archive.is https://www.google.com
[2022-05-17T15:40:47] [ERROR] exec: "tor": executable file not found in $PATH
https://www.google.com => archive.today is unavailable.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/analysis.yml
.github/workflows/linter.yml
.github/workflows/release.yml
.github/workflows/stale.yml
.github/workflows/testing.yml
step-security/harden-runner v2.2.1@1f99358870fe1c846a3ccba386cc2b2246836776
actions/setup-go v4.0.0@4d34df0c2316fe8122ab82dc22947d607c0c91f9
actions/checkout v3.4.0@24cb9080177205b6e8c946b17badbe402adc938f
tor-actions/setup-tor 462b4eef22eecc86cc4abdedafc95a38667e2557
tor-actions/setup-tor 462b4eef22eecc86cc4abdedafc95a38667e2557
actions/upload-artifact v3.1.2@0b7f8abb1508181956e8e162db84b466c27e18ce
go.mod
go 1.19
github.com/PuerkitoBio/goquery v1.8.1
github.com/cretz/bine v0.2.0
github.com/wabarc/helper v0.0.0-20230318095659-969de9ddf4b6@969de9ddf4b6
github.com/wabarc/logger v0.0.0-20210730133522-86bd3f31e792@86bd3f31e792
github.com/wabarc/proxier v0.0.0-20230610135141-b55fe1536465@b55fe1536465
golang.org/x/net v0.10.0
Hi there,
I've tried to install on Debian 10 but failed. Here is what I tried:
sudo apt install golang-go
go get github.com/wabarc/archive.is
archive.org google.fr
The output:
archive.org: unknown command
Another try:
go archive.org google.fr
go archive.org: unknown command
Run 'go help' for usage.
Do you have any hint? (I'm completely new to Go)
Thank you
Current Behavior
The below code is causing the the program to crash:
package main
import (
"context"
"fmt"
"net/url"
"time"
is "github.com/wabarc/archive.is"
)
func main() {
wbrc := &is.Archiver{}
url, _ := url.Parse(`https://gnu.org`)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cancel()
println("Archiving...")
if result, err := wbrc.Wayback(ctx, url); err != nil {
fmt.Printf("ERROR: %v\n", err)
} else {
fmt.Printf("Success: %v\n", result)
}
}
The TTY output:
Archiving...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x5e326e]
goroutine 1 [running]:
net/http.(*Client).deadline(0x40bea7?)
/usr/lib/go-1.21/src/net/http/client.go:194 +0xe
net/http.(*Client).do(0x0, 0xc000182100)
/usr/lib/go-1.21/src/net/http/client.go:608 +0x209
net/http.(*Client).Do(...)
/usr/lib/go-1.21/src/net/http/client.go:590
github.com/wabarc/archive%2eis.(*Archiver).Do(0xc000199ef0, 0xc000182100)
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:97 +0x74
github.com/wabarc/archive%2eis.(*Archiver).getSubmitID(0x4?, {0x6e41b5, 0x12})
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:213 +0x38b
github.com/wabarc/archive%2eis.(*Archiver).getValidDomain.func1({0x919fa0?, 0x7, 0x0?})
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:241 +0x8c
github.com/wabarc/archive%2eis.(*Archiver).getValidDomain(0xc000199ef0, 0xc000199e58)
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:252 +0x83
github.com/wabarc/archive%2eis.(*Archiver).archive(0xc000199ef0, {0x75d2b0, 0xc0001920e0}, 0xc000199e58, 0x439114?)
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:136 +0x6e
github.com/wabarc/archive%2eis.(*Archiver).Wayback(0x6e199d?, {0x75d2b0?, 0xc0001920e0?}, 0xc0000061a0?)
/home/ramon/src/go/pkg/mod/github.com/wabarc/[email protected]/is.go:113 +0x3b
main.main()
/home/ramon/src/go/src/test/main.go:33 +0xc8
exit status 2
Expected behavior/code
The code should not crash.
Environment
Possible Solution
N/A
Additional context/Screenshots
N/A
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.