I use a few RSS feeds from ABC (australia), but I don't want sport articles. I'm trying to use the rss feed for the sport articles as a blacklist so if the articles appear in any other feed they won't be downloaded. Can't get it to work, here's what I've done:
Code:
def parse_feeds(self):
exclude_feed = self.index_to_soup('https://www.abc.net.au/news/feed/2942460/rss.xml')
exclude_urls = {item.find('link').string for item in exclude_feed.findAll('item') if item.find('link')}
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
feed.articles = [art for art in feed.articles if not art.url in exclude_urls]
return feeds
Has anyone else done this before?