mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Improve content scraper
This commit is contained in:
parent
827683ab59
commit
c6d9eb3614
7 changed files with 39 additions and 3 deletions
|
@ -18,12 +18,16 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
|
|||
}
|
||||
|
||||
rules := strings.Split(rulesList, ",")
|
||||
rules = append(rules, "add_pdf_download_link")
|
||||
|
||||
for _, rule := range rules {
|
||||
switch strings.TrimSpace(rule) {
|
||||
case "add_image_title":
|
||||
entryContent = addImageTitle(entryURL, entryContent)
|
||||
case "add_youtube_video":
|
||||
entryContent = addYoutubeVideo(entryURL, entryContent)
|
||||
case "add_pdf_download_link":
|
||||
entryContent = addPDFLink(entryURL, entryContent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue