~ubuntu-branches/ubuntu/jaunty/calibre/jaunty-backports

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/lrf/web/profiles/faznet.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-01-20 17:14:02 UTC
  • Revision ID: james.westby@ubuntu.com-20090120171402-8y3znf6nokwqe80k
Tags: upstream-0.4.125+dfsg
ImportĀ upstreamĀ versionĀ 0.4.125+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
__license__   = 'GPL v3'
 
2
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
 
3
'''
 
4
Profile to download FAZ.net
 
5
'''
 
6
import re
 
7
 
 
8
from calibre.ebooks.lrf.web.profiles import DefaultProfile 
 
9
 
 
10
class FazNet(DefaultProfile): 
 
11
 
 
12
    title = 'FAZ NET' 
 
13
    max_recursions = 2 
 
14
    html_description = True 
 
15
    max_articles_per_feed = 30 
 
16
 
 
17
    preprocess_regexps = [
 
18
       (re.compile(r'Zum Thema</span>.*?</BODY>', re.IGNORECASE | re.DOTALL), 
 
19
        lambda match : ''),
 
20
    ]    
 
21
 
 
22
 
 
23
    def get_feeds(self): 
 
24
        return [ ('FAZ.NET', 'http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml') ] 
 
25
 
 
26
    def print_version(self, url): 
 
27
        return url.replace('.html?rss_aktuell', '~Afor~Eprint.html') 
 
28