Skip to content

Commit

Permalink
Added option to strip query from RSS entry URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Jul 17, 2023
1 parent a20704b commit c67e367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/jasper/component/RssParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ private void saveConfig(Ref feed, Feed config) {
private Ref parseEntry(Ref feed, Feed config, SyndEntry entry, Map<String, Object> defaultThumbnail) {
var ref = new Ref();
var l = entry.getLink();
if (config.isStripQuery() && l.contains("?")) {
l = l.substring(0, l.indexOf("?"));
}
try {
var web = webScraper.web(l);
if (web != null && config.isScrapeWebpage()) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/jasper/plugin/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Feed {
private boolean disableEtag;
private String etag;
private Duration scrapeInterval;
private boolean stripQuery;
private boolean scrapeWebpage;
private boolean scrapeDescription;
private boolean scrapeContents;
Expand Down

0 comments on commit c67e367

Please sign in to comment.