Handle the absence of guid tag for RSS 2.0 items

This commit is contained in:
Shinokuni 2020-07-14 15:13:46 +02:00
parent 0122400c85
commit d9652c725b
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ public final class ItemMatcher {
newItem.setAuthor(item.getCreator());
newItem.setContent(item.getContent()); // Jsoup.clean(item.getContent(), Whitelist.relaxed())
newItem.setDescription(item.getDescription());
newItem.setGuid(item.getGuid());
newItem.setGuid(item.getGuid() != null ? item.getGuid() : item.getLink());
newItem.setTitle(Utils.cleanText(item.getTitle()));
try {

View File

@ -51,7 +51,7 @@ public class RSSItem {
@Namespace(prefix = "content")
private String content;
@Element
@Element(required = false)
private String guid;
public String getTitle() {