tweak feed fetching

This commit is contained in:
Jeremie Panzer
2013-03-27 09:37:15 +01:00
parent 3bf414c82b
commit 0d83bd19d0
6 changed files with 69 additions and 71 deletions

View File

@@ -30,7 +30,6 @@ public class FeedParser {
feed.setLastUpdated(Calendar.getInstance().getTime());
try {
xml = balanceTags(xml);
SyndFeed rss = new SyndFeedInput().build(new StringReader(xml));
List<SyndEntry> items = rss.getEntries();
@@ -46,7 +45,6 @@ public class FeedParser {
feed.getEntries().add(entry);
}
} catch (Exception e) {
e.printStackTrace();
throw new FeedException(String.format(
"Could not parse feed from %s : %s", feedUrl,
e.getMessage()), e);
@@ -72,11 +70,6 @@ public class FeedParser {
return content;
}
private String balanceTags(String xml) throws Exception {
// TODO close tags
return xml;
}
private String handleContent(String content) {
org.jsoup.nodes.Document doc = Jsoup.parse(content, "UTF-8");
doc.select("a").attr("target", "_blank");