home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/env python
-
- __license__ = 'GPL v3'
- __copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
- '''
- frazpc.pl
- '''
-
- from calibre.web.feeds.news import BasicNewsRecipe
- import re
- class FrazPC(BasicNewsRecipe):
- title = u'frazpc.pl'
- publisher = u'frazpc.pl'
- description = u'Tw\xf3j Vortal Technologiczny'
- language = 'pl'
- __author__ = u'Tomasz D\u0142ugosz'
- oldest_article = 7
- max_articles_per_feed = 100
- use_embedded_content = False
- no_stylesheets = True
-
- feeds = [(u'Aktualno\u015bci', u'http://www.frazpc.pl/feed'), (u'Recenzje', u'http://www.frazpc.pl/kat/recenzje-2/feed') ]
-
- keep_only_tags = [dict(name='div', attrs={'id':'FRAZ_CONTENT'})]
-
- remove_tags = [dict(name='p', attrs={'class':'gray tagsP fs11'})]
-
- preprocess_regexps = [
- (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
- [(r'<div id="post-[0-9]*"', lambda match: '<div id="FRAZ_CONTENT"'),
- (r'href="/f/news/', lambda match: 'href="http://www.frazpc.pl/f/news/'),
- (r' <a href="http://www.frazpc.pl/[^>]*?">(Skomentuj|Komentarz(e)?\([0-9]*\))</a> \|', lambda match: '')]
- ]
-
- remove_attributes = [ 'width', 'height' ]
-