From bd91e5f320fb79e0d8109dca918664489956f005 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 20 Dec 2024 15:33:29 +0100 Subject: [PATCH] Add more referer spoofing Based on #2261. For moyu.im/jandan.net, see https://github.com/DIYgod/RSSHub/issues/11528 --- internal/reader/rewrite/rules.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/reader/rewrite/rules.go b/internal/reader/rewrite/rules.go index 4a77b1ff..ee5b298e 100644 --- a/internal/reader/rewrite/rules.go +++ b/internal/reader/rewrite/rules.go @@ -50,6 +50,8 @@ func GetRefererForURL(u string) string { } switch parsedUrl.Hostname() { + case "moyu.im": + return "https://i.jandan.net" case "i.pximg.net": return "https://www.pixiv.net" case "sp1.piokok.com": @@ -60,6 +62,10 @@ func GetRefererForURL(u string) string { return "https://weibo.com" case "img.hellogithub.com": return "https://hellogithub.com" + case "bjp.org.cn": + return "https://bjp.org.cn" + case "appinn.com": + return "https://appinn.com" } switch { @@ -67,6 +73,8 @@ func GetRefererForURL(u string) string { return "https://weibo.com" case strings.HasSuffix(parsedUrl.Hostname(), ".cdninstagram.com"): return "https://www.instagram.com" + case strings.HasSuffix(parsedUrl.Hostname(), ".moyu.im"): + return "https://i.jandan.net" } return ""