Add basic HTTP errors handling
This commit is contained in:
@@ -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("Не удалось получить данные с форума")
|
||||
|
Reference in New Issue
Block a user