diff --git a/api.go b/api.go index 245afdc..898038d 100644 --- a/api.go +++ b/api.go @@ -37,7 +37,7 @@ func (api *Api) GetReadingList(ctx context.Context, listIndex int) (*ReadingList selection := doc.Find("table tbody tr") entries := make([]ReadingListEntry, 0, selection.Length()) selection.Each(func(i int, s *goquery.Selection) { - link := s.Find("td:nth-child(2) a") + link := s.Find("td:nth-child(2) a:first-child") href, ok := link.Attr("href") if !ok { return @@ -200,7 +200,7 @@ func (api *Api) getChapterEntriesByPageIndex(ctx context.Context, novelID NovelI entryElems.Each(func(i int, s *goquery.Selection) { td3 := s.Find("td:nth-child(3) a.chp-release") - chapterID := td3.Text() + chapterID := strings.TrimSpace(td3.Text()) groupID := path.Base(s.Find("td:nth-child(2) a").AttrOr("href", "")) link := "https:" + td3.AttrOr("href", "")