1
0
Fork 0
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:
Frédéric Guillot 2017-12-13 21:30:40 -08:00
parent 827683ab59
commit c6d9eb3614
7 changed files with 39 additions and 3 deletions

View file

@ -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)
}
}