From a2888fbbbe04c5d9047ca5de6b318f927d7ce14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 7 Jun 2023 11:30:32 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AF=E3=82=BD=E3=82=AC=E3=82=AD=E3=81=A0?= =?UTF-8?q?=E3=82=8F=E3=80=81GitHub=E3=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/dirview.go | 4 ++-- pages/repo.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/dirview.go b/pages/dirview.go index da39ff7..691d1df 100644 --- a/pages/dirview.go +++ b/pages/dirview.go @@ -66,8 +66,8 @@ func DirView(c *fiber.Ctx) error { sc := colly.NewCollector(colly.AllowedDomains("github.com"), colly.UserAgent(UserAgent)) sc.Limit(&colly.LimitRule{ DomainGlob: "github.githubassets.com/*", - Delay: 5 * time.Second, - RandomDelay: 5 * time.Second, + Delay: 15 * time.Second, + RandomDelay: 15 * time.Second, }) sc.OnHTML("div#readme", func(e *colly.HTMLElement) { Scrape.Readme = e.ChildText("a[href='#readme']") diff --git a/pages/repo.go b/pages/repo.go index 6bf3a49..241445c 100644 --- a/pages/repo.go +++ b/pages/repo.go @@ -81,8 +81,8 @@ func HandleRepo(c *fiber.Ctx) error { sc := colly.NewCollector(colly.AllowedDomains("github.com"), colly.UserAgent(UserAgent)) sc.Limit(&colly.LimitRule{ DomainGlob: "github.githubassets.com/*", - Delay: 5 * time.Second, - RandomDelay: 5 * time.Second, + Delay: 15 * time.Second, + RandomDelay: 15 * time.Second, }) sc.OnHTML("div.Layout-sidebar", func(e *colly.HTMLElement) { Scrape.Username = c.Params("user")