diff --git a/.vscode/launch.json b/.vscode/launch.json index e0ab32a..2fe5420 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,12 +2,20 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug download volume", + "name": "volume", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}", "args": ["download", "volume", "-n", "2013", "-v", "165880"] + }, + { + "name": "novel", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}", + "args": ["download", "novel", "-n", "4325"] } ] } diff --git a/downloader/bilinovel/bilinovel.go b/downloader/bilinovel/bilinovel.go index 89df2b8..e56fcf8 100644 --- a/downloader/bilinovel/bilinovel.go +++ b/downloader/bilinovel/bilinovel.go @@ -413,7 +413,9 @@ func downloadChapterByPage(page, chapterIdx int, chapter *model.Chapter, outputP content.Find(".cgo").Remove() content.Find("center").Remove() content.Find(".google-auto-placed").Remove() - content.Find("p").Last().AddClass("read-font") + if strings.Contains(resp.String(), `font-family: "read"`) { + content.Find("p").Last().AddClass("read-font") + } content.Find("img").Each(func(i int, s *goquery.Selection) { if err != nil {