完成twitch 数据提取入库
This commit is contained in:
@@ -36,6 +36,7 @@ func (cl *UserList) Execute() {
|
||||
defer wd.Close()
|
||||
|
||||
var loop int32 = 1
|
||||
var count = 0
|
||||
|
||||
go func() {
|
||||
signalchan := make(chan os.Signal)
|
||||
@@ -87,12 +88,7 @@ func (cl *UserList) Execute() {
|
||||
wd.KeyUp(selenium.EndKey)
|
||||
time.Sleep(time.Millisecond * 1500)
|
||||
if len(elements) == liveurls {
|
||||
if liveurls == 0 {
|
||||
delayerror -= 1
|
||||
} else {
|
||||
delayerror--
|
||||
}
|
||||
|
||||
delayerror--
|
||||
if delayerror <= 0 {
|
||||
break
|
||||
}
|
||||
@@ -140,5 +136,11 @@ func (cl *UserList) Execute() {
|
||||
estore.InsertStreamer(streamer)
|
||||
}
|
||||
log.Println("streamer insert", len(elements))
|
||||
count++
|
||||
if count >= 100 {
|
||||
wd.Close()
|
||||
wd = intimate.GetChromeDriver(3030)
|
||||
count = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user