home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/env python
-
- __license__ = 'GPL v3'
- __copyright__ = '2010, Tomasz Dlugosz <tomek3d@gmail.com>'
- '''
- nczas.com
- '''
-
- from calibre.web.feeds.news import BasicNewsRecipe
-
- #
-
- class NCzas(BasicNewsRecipe):
- title = u'Najwy\u017cszy Czas!'
- description = u'Najwy\u017cszy Czas!\nwydanie internetowe'
- __author__ = u'Tomasz D\u0142ugosz'
- language = 'pl'
- oldest_article = 7
- max_articles_per_feed = 100
- no_stylesheets = True
- cover_url = 'http://nczas.com/wp-content/themes/default/grafika/logo.png'
-
- keep_only_tags = [dict(name='div', attrs={'class':'trescartykulu'})]
-
- feeds = [(u'Najwy\u017cszy Czas!', u'http://nczas.com/feed/')]
-
- def postprocess_html(self, soup, first):
-
- for tag in soup.findAll(name= 'img', alt=""):
- tag.extract()
-
- for item in soup.findAll(align = "right"):
- del item['align']
-
- return soup
-