This commit is contained in:
zu1k
2020-08-12 13:50:29 +08:00
parent 2c42b7b6e2
commit 3127fe6e2c
3 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,6 @@ import (
)
func Cron() {
gocron.Every(10).Minutes().Do(CrawlTGChannel)
_ = gocron.Every(10).Minutes().Do(CrawlTGChannel)
<-gocron.Start()
}

View File

@@ -41,7 +41,7 @@ func CrawlTGChannel() {
num := len(proxies)
for i := 0; i < num; i++ {
proxies[i].SetName("@tgbotlist_" + strconv.Itoa(rand.Int()))
proxies[i].SetName(strconv.Itoa(rand.Int()))
}
cache.SetProxies(proxies)
cache.SetString("clashproxies", provider.Clash{Proxies: proxies}.Provide())

View File

@@ -8,6 +8,7 @@ import (
)
func main() {
go app.Cron()
fmt.Println("Do the first crawl...")
app.CrawlTGChannel()
api.Run()