finish tag slice
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"intimate"
|
||||
"log"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/tebeka/selenium"
|
||||
@@ -48,6 +49,7 @@ func main() {
|
||||
var updateUrl map[string]string
|
||||
json.Unmarshal(streamer.UpdateUrl.([]byte), &updateUrl)
|
||||
liveUrl := updateUrl["live"]
|
||||
liveUrl = strings.Replace(liveUrl, "/watchparty", "", -1)
|
||||
log.Println(liveUrl)
|
||||
|
||||
// err = wd.Get("https://www.twitch.tv/zoe_0601" + "/about")
|
||||
@@ -67,6 +69,13 @@ func main() {
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
err = extractUserName(wd, streamer)
|
||||
if err != nil {
|
||||
_, err = wd.FindElement(selenium.ByXPATH, "//a[@data-a-target='browse-channels-button']")
|
||||
if err == nil {
|
||||
log.Println(streamer.UserId, "may be cancell")
|
||||
streamer.Operator = 5
|
||||
streamer.UpdateTime = sql.NullTime{Time: time.Now(), Valid: true}
|
||||
estore.UpdateStreamer(streamer)
|
||||
}
|
||||
continue
|
||||
}
|
||||
err = extractFollowers(wd, clog)
|
||||
@@ -94,7 +103,7 @@ func main() {
|
||||
}
|
||||
|
||||
streamer.Platform = intimate.Ptwitch
|
||||
clog.Platform = string(streamer.Platform)
|
||||
clog.Platform = streamer.Platform
|
||||
clog.UpdateTime = sql.NullTime{Time: time.Now(), Valid: true}
|
||||
lastClogId := estore.InsertClog(clog)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user