浏览代码

Check HTTP error code correctly

poesty 9 月之前
父节点
当前提交
4dc32872e8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      rss2hook.go

+ 2 - 2
rss2hook.go

@@ -138,8 +138,8 @@ func notify(i int, item *rss.Item) {
 	}
 	status := res.StatusCode
 
-	if status != 200 {
-		log.Printf("notify: Warning - Status code was not 200: %d\n", status)
+	if status >= 400 {
+		log.Printf("notify: Warning - Status code %d from %s\n", status, Loaded[i].Hook)
 	}
 }