mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-26 04:17:21 +00:00
[get] print url option
This commit is contained in:
@@ -30,14 +30,19 @@ type ScrapeConfig struct {
|
||||
Include bool
|
||||
ImagesOnly bool
|
||||
UseLinkName bool
|
||||
PrintURL bool
|
||||
}
|
||||
|
||||
func NewScrapeConfig() *ScrapeConfig {
|
||||
return &ScrapeConfig{0, "", false, -1, 0, false, -1, -1, true, false, false}
|
||||
return &ScrapeConfig{0, "", false, -1, 0, false, -1, -1, true, false, false, false}
|
||||
}
|
||||
|
||||
func NewScrapeConfigQuiet() *ScrapeConfig {
|
||||
return &ScrapeConfig{0, "", true, -1, 0, false, -1, -1, true, false, false, false}
|
||||
}
|
||||
|
||||
func NewScrapeConfigNoInclude() *ScrapeConfig {
|
||||
return &ScrapeConfig{0, "", false, -1, 0, false, -1, -1, false, false, false}
|
||||
return &ScrapeConfig{0, "", false, -1, 0, false, -1, -1, false, false, false, false}
|
||||
}
|
||||
|
||||
func NewScrapeConfigs(selectors []string) []*ScrapeConfig {
|
||||
@@ -252,7 +257,7 @@ func NewChapterFromURL(url, linkName string, configs []*ScrapeConfig, index int,
|
||||
|
||||
}
|
||||
|
||||
return chapter{string(body), name, article.Byline, content, subchapters, config}
|
||||
return chapter{url, string(body), name, article.Byline, content, subchapters, config}
|
||||
}
|
||||
|
||||
func tableOfContent(url string, config *ScrapeConfig, subConfig *ScrapeConfig, quiet bool) ([]chapter, chapter) {
|
||||
|
||||
Reference in New Issue
Block a user