(Fixed #5) bug fix

pull/9/head
hahwul 2020-04-11 02:28:57 +09:00
parent 6530777f27
commit 475930cdf7
2 changed files with 9 additions and 1 deletions

BIN
add-tool

Binary file not shown.

View File

@ -99,7 +99,15 @@ func main() {
defer resp.Body.Close()
if title, ok := GetHtmlTitle(resp.Body); ok {
desc = strings.Split(string(title), ": ")[1]
if strings.Contains(string(title), ": ") {
desc = strings.Split(string(title), ": ")[1]
} else {
reader1 := bufio.NewReader(os.Stdin)
fmt.Println("[+] Don't have descriptions / input description")
a, _ := reader1.ReadString('\n')
desc = strings.TrimRight(a, "\r\n")
}
} else {
println("Fail to get HTML title")
}