rename api name xml -> html

This commit is contained in:
eson
2020-08-12 17:42:27 +08:00
parent 885003bf76
commit d91e6be269
5 changed files with 12 additions and 11 deletions

View File

@@ -49,7 +49,7 @@ func main() {
continue
}
var ldata *LiveData
etor := extractor.ExtractXml(resp.Content())
etor := extractor.ExtractHtml(resp.Content())
ldata = etor.GetObjectByTag(LiveData{}).(*LiveData)
ldata.MaxViews = regexp.MustCompile("\\d+").FindString(ldata.MaxViews)
coincount := 0
@@ -59,11 +59,14 @@ func main() {
giverurl := streamer.LiveUrl.String + "/backers/" + strconv.Itoa(i)
resp, err = ses.Get(giverurl).Execute()
if err != nil {
estore.UpdateError(streamer, err)
log.Panic(err)
}
etor := extractor.ExtractXml(resp.Content())
etor := extractor.ExtractHtml(resp.Content())
xp, err := etor.XPaths("//td[@class='tw-memorial-table-recent-point']")
if err != nil {
estore.UpdateError(streamer, err)
log.Panic(err)
}

View File

@@ -10,7 +10,7 @@ import (
// Follower string `exp:".//span[@class='tw-user-nav-list-count']" method:"Text"`
// }
func TestMain(t *testing.T) {
func estMain(t *testing.T) {
main()
}