Benutze url.QueryEscape für die Suchwörter
This commit is contained in:
parent
1e0b98a116
commit
89cf49af58
3
dict.go
3
dict.go
@ -4,6 +4,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@ -30,7 +31,7 @@ func main() {
|
|||||||
fromto = os.Args[2] + "."
|
fromto = os.Args[2] + "."
|
||||||
}
|
}
|
||||||
|
|
||||||
r, err := http.Get("http://" + fromto + BASE + os.Args[1])
|
r, err := http.Get("http://" + fromto + BASE + url.QueryEscape(os.Args[1]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println("error:", err.Error())
|
println("error:", err.Error())
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user