Fixing the "net/url: invalid control character in URL" error on waybackarchive

Running string() on an integer returns an empty string, changing to strconv.Itoa() instead.
master
icytrues 2019-10-16 23:34:06 +02:00 committed by GitHub
parent 357c3403ef
commit c7118a2078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func Query(args ...interface{}) interface{} {
}
for i := 0; i <= numPages; i++ {
resp, err := helper.GetHTTPResponse("http://web.archive.org/cdx/search/cdx?url=*."+domain+"/*&output=json&fl=original&collapse=urlkey&page="+string(i), state.Timeout)
resp, err := helper.GetHTTPResponse("http://web.archive.org/cdx/search/cdx?url=*."+domain+"/*&output=json&fl=original&collapse=urlkey&page="+strconv.Itoa(i), state.Timeout)
if err != nil {
if !state.Silent {
fmt.Printf("\nwaybackarchive: %v\n", err)