Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 03-17-2023, 04:27 PM   #1
red_trumpet
Junior Member
red_trumpet began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2023
Device: Tolino Vision 6
News recipes: Is it possible to remove different tags, depending on the article URL?

When writing a recipe for a news site, one typically declares which HTML tags are to be removed, using e.g.
Code:
remove_tags
and related attributes. Now the RSS feed of German state news Tagesschau also links to articles at other sites, like for example NDR. Is it possible to have different
Code:
remove_tags
, depending on the URL of the article?

Also, it is possible to combine different RSS feeds, using the
Code:
feed
array. I was also wondering how one would deal with that, if they need different
Code:
remove_tags
.
red_trumpet is offline   Reply With Quote
Old 03-17-2023, 10:59 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No you cant have different remove_tags per URL. If you need more advanced processing than remove_tags provides, implement preprocess_html in your recipe, then you can do whatever you like.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fetch article url from facebook feed knowledgecrawler Recipes 1 08-22-2014 03:07 AM
How to insert article URL? Mixx Recipes 4 01-09-2014 01:26 PM
New York Times - Link to article URL? gianfri Recipes 2 11-09-2013 09:53 PM
Get article URL in postprocess_html rmflight Recipes 5 11-29-2012 11:37 AM
Trying to strip the date from an article URL Finbar127 Recipes 1 02-17-2011 03:02 PM


All times are GMT -4. The time now is 11:53 PM.


MobileRead.com is a privately owned, operated and funded community.