|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Nov 2012
Device: Pocketbook Inkpad 3
|
How to remove an article which contains "this article was sponsored" in the text ?
Some feeds have articles which contain advertisements. I would like to remove the articles from the feed based on some string in the content like "this article was sponsored by".
How can this be achieved ? Up to I tried to check the article content in parse_feeds() but this does not work. I think there is not yet anything in article.content: Spoiler:
Any help is appreciated. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Implement preprocess_raw_html in your recipeand call self.abort_article() inside it if you want to skip the article.
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Yikes: "this article was downloaded by calibre" after every article | sheygetz | Calibre | 11 | 05-29-2015 02:56 AM |
include "This article was downloaded by calibre from" for tablet profile | Purple Lady | Recipes | 10 | 06-23-2013 01:28 AM |
Remove "This article was downloaded by calibre from..." | peonazerty | Recipes | 1 | 05-27-2013 08:40 AM |
Article on Plastic Logic in german magazine "Der Spiegel" | Manichean | News | 1 | 09-18-2008 06:48 AM |
Ebook article/review on pocketlint UK "ebooks taking over the paper" | stustaff | News | 4 | 07-07-2008 08:05 AM |