diff options
| author | BigCoke233 <hi@guhub.cn> | 2026-01-19 16:08:57 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2026-01-19 16:08:57 +0800 |
| commit | 7c44f89d43f5ca62a86bddc13def0d0a925a9800 (patch) | |
| tree | e9768581eb4447ce102272e5e5330d70e5707325 /scripts | |
| parent | 604f47882c20a63a2e68e94d0fcfb6df43f0f337 (diff) | |
chore: remove guhub.cn domain from all sources
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/get_external_link_rank.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/get_external_link_rank.go b/scripts/get_external_link_rank.go index 425f47b2..4189c191 100644 --- a/scripts/get_external_link_rank.go +++ b/scripts/get_external_link_rank.go @@ -34,7 +34,11 @@ func countExternalLinks(root string) [][2]interface{} { matches := linkRegex.FindAllString(string(data), -1) for _, match := range matches { u, err := url.Parse(match) - if err == nil && u.Host != "" && u.Host != "r2.eltr.ac" { + if err == nil && u.Host != "" { + // skip my domains + if strings.HasSuffix(u.Host, "eltr.ac") || strings.HasSuffix(u.Host, "guhub.cn") { + continue + } counts[u.Host]++ } } |
