|
|
#1 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2024
Device: Kindle Oasis 2
|
Use RSS as a blacklist
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
|
|
|
|
|
|
#2 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
Code:
def get_article_url(self, article):
url = BasicNewsRecipe.get_article_url(self, article)
if '/sports/' not in url:
return url
return None
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2024
Device: Kindle Oasis 2
|
This doesn't work, the URL does not contain /sports/
For example: https://www.abc.net.au/news/2025-11-...land/105987460 That's why I'm trying to use the RSS feed for sports as a blacklist |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hacks kindle 4 - blacklist | ale14 | Amazon Kindle | 12 | 06-14-2014 01:51 PM |
| Is the Onyx Boox i62 capable of reading RSS (subscribe to RSS feeds)? | Ababakar | Onyx Boox | 3 | 11-08-2012 08:38 AM |
| Brewt's Blacklist | brewt | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 06-07-2010 12:00 PM |