You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
411 B
27 lines
411 B
4 years ago
|
package easyquotation
|
||
|
|
||
|
import (
|
||
|
"easyquotation/sina"
|
||
|
"easyquotation/stock"
|
||
|
"fmt"
|
||
|
"github.com/gocolly/colly"
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func TestInit(t *testing.T) {
|
||
|
Init()
|
||
|
|
||
|
c := colly.NewCollector()
|
||
|
SinaStock_spider := sina.NewSinaStock(c)
|
||
|
SinaStock_spider.Start()
|
||
|
|
||
|
tt := time.NewTicker(time.Second * 3)
|
||
|
for {
|
||
|
select {
|
||
|
case <- tt.C:
|
||
|
fmt.Println(stock.G_STOCK_MANAGER.StockList["sh600000"])
|
||
|
}
|
||
|
}
|
||
|
}
|