02-11-2009, 06:34 PM | #1 |
Member
Posts: 20
Karma: 104
Join Date: Jan 2009
Device: pocketbook 360
|
Apply match_regexps and filter_regexpr on feeds
Hi,
match_regexps and filter_regexps seems to be applied only on html link resolution. I need them in feeds resolution too since some of them have heterogeneous links: Code:
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:dct="http://purl.org/dc/terms/"> <channel> ... <item> ... <link>http://www.liberation.fr/monde/0101318771-les-electeurs-israeliens-ont-choisi-le-pragmatisme</link> ... </item> <item> ... <link>http://www.liberation.fr/monde/0101318514-repli</link> ... </item> <item> ... <!-- Item I want to ignore because it reference another website that isn't handled by my recipe --> <link>http://secretdefense.blogs.liberation.fr/defense/2009/02/un-officier-fra.html</link> ... </item> ... </channel> </rss> Code:
match_regexps = (r'http://www\.liberation\.fr/.*') Is there another option make that happend or can I create a new ticket on trac ? |
02-11-2009, 07:08 PM | #2 |
creator of calibre
Posts: 44,621
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Implement the get_article_url method in your recipe. You can do arbitrarily powerful processing in it.
|
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to apply the enhancements/patches ? | nubbol | Calibre | 2 | 09-05-2010 12:42 AM |
How to apply fixed-width fonts | EnergyLens | Calibre | 5 | 04-17-2010 01:41 PM |
Hachette jumps on the Apply pricing bandwagon | CopperTrail | News | 0 | 02-06-2010 02:01 PM |
Do international wireless fees apply to samples? | RobbieClarken | Amazon Kindle | 4 | 10-25-2009 10:52 AM |
Does UK copyright apply to AUS sourced material? | ShellShock | Upload Help | 24 | 05-27-2009 09:33 AM |