accept rss feeds without channel descriptions

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6464 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2009-11-06 22:46:21 +00:00
parent 08f1cbb125
commit cd6745b292

View File

@ -88,17 +88,21 @@ public class rssParser extends AbstractParser implements Idiom {
final RSSFeed feed = new RSSReader(source).getFeed();
if (feed == null) throw new ParserException("no feed in document",location);
if (feed.getChannel() == null) throw new ParserException("no channel in document",location);
// getting the rss feed title and description
final String feedTitle = feed.getChannel().getTitle();
// getting feed creator
final String feedCreator = feed.getChannel().getAuthor();
if (feedCreator != null && feedCreator.length() > 0) authors.append(",").append(feedCreator);
// getting the feed description
final String feedDescription = feed.getChannel().getDescription();
String feedTitle = "";
String feedDescription = "";
if (feed.getChannel() != null) {//throw new ParserException("no channel in document",location);
// get the rss feed title and description
feedTitle = feed.getChannel().getTitle();
// get feed creator
final String feedCreator = feed.getChannel().getAuthor();
if (feedCreator != null && feedCreator.length() > 0) authors.append(",").append(feedCreator);
// get the feed description
feedDescription = feed.getChannel().getDescription();
}
if (feed.getImage() != null) {
final DigestURI imgURL = new DigestURI(feed.getImage(), null);