1

Add basic HTTP errors handling

This commit is contained in:
2019-09-28 20:20:23 +04:00
parent a504299150
commit a599d898b0
3 changed files with 37 additions and 6 deletions

View File

@@ -6,11 +6,14 @@ package fetcherv1
import (
"strconv"
"time"
)
func fetch(forumID int) {
startPage := "https://" + c.Config.URL + "/forum/viewforum.php?f=" + strconv.Itoa(forumID)
time.Sleep(5 * time.Second)
startPageFile, err := dumpForumPage(startPage)
if err != nil {
dlog.Error().Err(err).Msg("Не удалось получить данные с форума")