aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2021-12-03 08:18:36 -0700
committerJordan <me@jordan.im>2021-12-03 08:18:36 -0700
commitffbfef5b8ec18f3f742999fce265fbe8d0830f37 (patch)
treed52d24a29257b0d20f5ae77badccaabb5b09a4a9
parentae8b987ab1a29b7abbea8bc676bc7180d721af19 (diff)
downloadkeep-ffbfef5b8ec18f3f742999fce265fbe8d0830f37.tar.gz
keep-ffbfef5b8ec18f3f742999fce265fbe8d0830f37.zip
archive: add discord.gg to blocklist, log err
-rw-r--r--archive.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/archive.go b/archive.go
index c88cff7..33d7ca5 100644
--- a/archive.go
+++ b/archive.go
@@ -17,7 +17,7 @@ var (
blacklist = []string{"cdn.discordapp.com", "discord.com", "tenor.com",
"c.tenor.com", "archive.org", "web.archive.org", "youtu.be",
- "youtube.com", "www.youtube.com"}
+ "youtube.com", "www.youtube.com", "discord.gg"}
)
type Wayback struct {
@@ -67,6 +67,7 @@ func archive(url string) int {
req, err := http.NewRequest("GET", API_SAVE+url, nil)
resp, err := client.Do(req)
if err != nil {
+ log.Println(err)
return 0
}
return resp.StatusCode