mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
check if the feed has changed by using publishDate of the feed or the first entry
This commit is contained in:
@@ -36,16 +36,18 @@ public class FeedFetcher {
|
||||
|
||||
HttpResult result = getter.getBinary(feedUrl, lastModified, eTag);
|
||||
if (extractFeedUrlFromHtml) {
|
||||
String extractedUrl = extractFeedUrl(StringUtils
|
||||
.newStringUtf8(result.getContent()), feedUrl);
|
||||
String extractedUrl = extractFeedUrl(
|
||||
StringUtils.newStringUtf8(result.getContent()), feedUrl);
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(extractedUrl)) {
|
||||
result = getter.getBinary(extractedUrl, lastModified, eTag);
|
||||
feedUrl = extractedUrl;
|
||||
}
|
||||
}
|
||||
feed = parser.parse(feedUrl, result.getContent());
|
||||
|
||||
feed.setLastModifiedHeader(result.getLastModifiedSince());
|
||||
feed.setEtagHeader(result.geteTag());
|
||||
feed.setFetchDuration(result.getDuration());
|
||||
return feed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user