File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1230,7 +1230,7 @@ func TibiaDataHTMLDataCollector(TibiaDataRequest TibiaDataRequestStruct) (string
12301230 case http .StatusFound :
12311231 // Check if page is in maintenance mode
12321232 location , _ := res .RawResponse .Location ()
1233- if location .Host == "maintenance.tibia.com" {
1233+ if location != nil && location .Host == "maintenance.tibia.com" {
12341234 LogMessage := "maintenance mode detected on tibia.com"
12351235 log .Printf ("[info] TibiaDataHTMLDataCollector: %s!" , LogMessage )
12361236 return "" , validation .ErrorMaintenanceMode
@@ -1258,6 +1258,7 @@ func TibiaDataHTMLDataCollector(TibiaDataRequest TibiaDataRequestStruct) (string
12581258 doc , err := goquery .NewDocumentFromReader (resIo2 )
12591259 if err != nil {
12601260 log .Printf ("[error] TibiaDataHTMLDataCollector (URL: %s) error: %s" , res .Request .URL , err )
1261+ return "" , err
12611262 }
12621263
12631264 data , err := doc .Find (".Border_2 .Border_3" ).Html ()
You can’t perform that action at this time.
0 commit comments