TODO: streamerlist

This commit is contained in:
eson
2020-09-11 18:52:04 +08:00
parent c4d0140b42
commit ef7b59ce3d
5 changed files with 87 additions and 47 deletions

View File

@@ -20,11 +20,12 @@ import (
func Execute() {
ps := intimate.NewPerfectShutdown()
var adriver *intimate.AutoCloseDriver
for !ps.IsClose() {
var err error
adriver := intimate.GetChromeDriver()
adriver = intimate.GetChromeDriver()
wd := adriver.Webdriver
weburl := "https://www.twitch.tv/directory?sort=VIEWER_COUNT"
@@ -109,20 +110,17 @@ func Execute() {
if err != nil {
log.Println(err)
}
// TODO: Save href
// source := &intimate.Source{}
// source.Source = sql.NullString{String: href, Valid: true}
// source.Operator = 0
// source.Target = intimate.TTwitchChannel
// source.Url = weburl
// sstore.Insert(source)
}
log.Println("hrefs len:", len(hrefs))
// sstore.Deduplicate(intimate.TTwitchChannel, "source")
// wd.Close()
// wd.Quit()
time.Sleep(time.Minute * 30)
adriver.Close()
ps.Wait(time.Minute * 5)
}
func merge(nums1 []int, m int, nums2 []int, n int) {
for i := 0 ; i < n ; i++ {
nums1[m+i] = n[i]
}
sort
}
}