use first found link for chapter id
This commit is contained in:
parent
eafaeb43a4
commit
8f3739a8ea
4
api.go
4
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", "")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user