|
@@ -1,15 +1,12 @@
|
|
|
package base_from_ccf
|
|
|
|
|
|
import (
|
|
|
- "bytes"
|
|
|
"context"
|
|
|
"encoding/json"
|
|
|
"eta/eta_data_analysis/models"
|
|
|
"eta/eta_data_analysis/utils"
|
|
|
"fmt"
|
|
|
"github.com/PuerkitoBio/goquery"
|
|
|
- "golang.org/x/net/html/charset"
|
|
|
- "io"
|
|
|
"os"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -87,7 +84,7 @@ func GetCCFChartEdb() (err error) {
|
|
|
// 转换编码
|
|
|
|
|
|
// 转换编码
|
|
|
- utf8Reader, e := charset.NewReaderLabel("gb2312", bytes.NewReader(fileContent))
|
|
|
+ /*utf8Reader, e := charset.NewReaderLabel("gb2312", bytes.NewReader(fileContent))
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("utf8 reader err: %s", e.Error())
|
|
|
return
|
|
@@ -96,11 +93,11 @@ func GetCCFChartEdb() (err error) {
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("读取utf8 body err: %s", e.Error())
|
|
|
return
|
|
|
- }
|
|
|
+ }*/
|
|
|
//firstHtml := string(utf8Body)
|
|
|
//fmt.Println(firstHtml)
|
|
|
|
|
|
- isStop, indexList, e := AnalysisChartInventoryWeeklyEdb(utf8Body, v)
|
|
|
+ isStop, indexList, e := AnalysisChartInventoryWeeklyEdb(fileContent, v)
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("解析图表失败, err: %v", e)
|
|
|
return
|