Solves the lynx lack of 404 issue

This commit is contained in:
sloum 2020-09-17 21:24:16 -07:00
parent 97b74ea767
commit bafa5a0739
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ func Visit(webmode, url string, width int) (Page, error) {
return Page{}, fmt.Errorf("Invalid webmode setting")
}
c, err := exec.Command(webmode, "-dump", w, fmt.Sprintf("%d", width), url).Output()
if err != nil {
if err != nil && c == nil {
return Page{}, err
}
return parseLinks(string(c)), nil