[get] print url option

This commit is contained in:
lapwat
2024-08-14 23:32:33 +02:00
parent 1b2be1c390
commit 403fdcc0f0
7 changed files with 115 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
package book
type chapter struct {
url string
body string
name string
author string
@@ -10,11 +11,11 @@ type chapter struct {
}
func NewEmptyChapter() chapter {
return chapter{"", "", "", "", []chapter{}, NewScrapeConfigNoInclude()}
return chapter{"", "", "", "", "", []chapter{}, NewScrapeConfigNoInclude()}
}
func NewChapter(body, name, author, content string, subChapters []chapter, config *ScrapeConfig) chapter {
return chapter{body, name, author, content, subChapters, config}
func (c chapter) URL() string {
return c.url
}
func (c chapter) Body() string {