|
|
#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 ? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,615
Karma: 28549044
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 | |
|
|
![]() |
|
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 |