diff --git a/backend/data/market_news_api.go b/backend/data/market_news_api.go index 015101c..172fbbc 100644 --- a/backend/data/market_news_api.go +++ b/backend/data/market_news_api.go @@ -37,7 +37,7 @@ func (m MarketNewsApi) GetNewTelegraph(crawlTimeOut int64) *[]models.Telegraph { //logger.SugaredLogger.Info(string(response.Body())) document, _ := goquery.NewDocumentFromReader(strings.NewReader(string(response.Body()))) - document.Find(".telegraph-list").Each(func(i int, selection *goquery.Selection) { + document.Find(".telegraph-content-box").Each(func(i int, selection *goquery.Selection) { //logger.SugaredLogger.Info(selection.Text()) telegraph := models.Telegraph{Source: "财联社电报"} spans := selection.Find("div.telegraph-content-box span") diff --git a/backend/data/openai_api_test.go b/backend/data/openai_api_test.go index 057dcad..046ca8e 100644 --- a/backend/data/openai_api_test.go +++ b/backend/data/openai_api_test.go @@ -19,7 +19,8 @@ func TestNewDeepSeekOpenAiConfig(t *testing.T) { } func TestGetTopNewsList(t *testing.T) { - GetTopNewsList(30) + news := GetTopNewsList(30) + t.Log(news) } func TestSearchGuShiTongStockInfo(t *testing.T) {