Quotation from Sina source
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.
easyquotation/quotation_test.go

26 lines
411 B

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"])
}
}
}