aboutsummaryrefslogtreecommitdiff
path: root/server/ui/controller/entry.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-10 20:51:04 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-10 20:51:04 -0800
commit87ccad5c7f1edf8bce37af547ca1659326398fa8 (patch)
tree4998a78ac68b1c2c03e6152d26567928cdf042ec /server/ui/controller/entry.go
parent7a35c58f53d76356292e3e0ca9c91add3595a9e0 (diff)
downloadv2-87ccad5c7f1edf8bce37af547ca1659326398fa8.tar.gz
v2-87ccad5c7f1edf8bce37af547ca1659326398fa8.tar.zst
v2-87ccad5c7f1edf8bce37af547ca1659326398fa8.zip
Add scraper rules
Diffstat (limited to 'server/ui/controller/entry.go')
-rw-r--r--server/ui/controller/entry.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/server/ui/controller/entry.go b/server/ui/controller/entry.go
index eb47201f..5c1d3f55 100644
--- a/server/ui/controller/entry.go
+++ b/server/ui/controller/entry.go
@@ -40,18 +40,14 @@ func (c *Controller) FetchContent(ctx *core.Context, request *core.Request, resp
return
}
- content, err := scraper.Fetch(entry.URL)
+ content, err := scraper.Fetch(entry.URL, entry.Feed.ScraperRules)
if err != nil {
response.JSON().ServerError(err)
return
}
- if len(content) > len(entry.Content) {
- entry.Content = content
- c.store.UpdateEntryContent(entry)
- } else {
- content = entry.Content
- }
+ entry.Content = content
+ c.store.UpdateEntryContent(entry)
response.JSON().Created(map[string]string{"content": content})
}