~ubuntu-branches/debian/wheezy/calibre/wheezy

« back to all changes in this revision

Viewing changes to src/calibre/web/feeds/recipes/recipe_ourdailybread.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-09-18 01:18:18 UTC
  • mto: (29.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090918011818-2whiyzgvx59c7b7t
Tags: upstream-0.6.12+dfsg
ImportĀ upstreamĀ versionĀ 0.6.12+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env  python
2
 
 
3
 
__license__   = 'GPL v3'
4
 
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
5
 
'''
6
 
rbc.org
7
 
'''
8
 
 
9
 
from calibre.web.feeds.news import BasicNewsRecipe
10
 
 
11
 
class OurDailyBread(BasicNewsRecipe):
12
 
    title                 = 'Our Daily Bread'
13
 
    __author__            = 'Darko Miletic'
14
 
    description           = 'Religion'
15
 
    oldest_article        = 15
16
 
    language              = _('English')
17
 
    max_articles_per_feed = 100
18
 
    no_stylesheets        = True
19
 
    use_embedded_content  = False
20
 
    category              = 'religion'
21
 
    encoding              = 'utf-8'
22
 
    extra_css             = ' #devoTitle{font-size: x-large; font-weight: bold} '
23
 
    
24
 
    conversion_options = {  
25
 
                             'comments'    : description
26
 
                            ,'tags'        : category
27
 
                            ,'language'    : 'en'
28
 
                         }
29
 
                         
30
 
    keep_only_tags = [dict(name='div', attrs={'class':['altbg','text']})]
31
 
 
32
 
    feeds          = [(u'Our Daily Bread', u'http://www.rbc.org/rss.ashx?id=50398')]
33
 
 
34
 
    def preprocess_html(self, soup):
35
 
        return self.adeify_images(soup)
 
1
#!/usr/bin/env  python
 
2
 
 
3
__license__   = 'GPL v3'
 
4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
 
5
'''
 
6
rbc.org
 
7
'''
 
8
 
 
9
from calibre.web.feeds.news import BasicNewsRecipe
 
10
 
 
11
class OurDailyBread(BasicNewsRecipe):
 
12
    title                 = 'Our Daily Bread'
 
13
    __author__            = 'Darko Miletic'
 
14
    description           = 'Religion'
 
15
    oldest_article        = 15
 
16
    language = 'en'
 
17
 
 
18
    max_articles_per_feed = 100
 
19
    no_stylesheets        = True
 
20
    use_embedded_content  = False
 
21
    category              = 'religion'
 
22
    encoding              = 'utf-8'
 
23
    extra_css             = ' #devoTitle{font-size: x-large; font-weight: bold} '
 
24
    
 
25
    conversion_options = {  
 
26
                             'comments'    : description
 
27
                            ,'tags'        : category
 
28
                            ,'language'    : 'en'
 
29
                         }
 
30
                         
 
31
    keep_only_tags = [dict(name='div', attrs={'class':['altbg','text']})]
 
32
 
 
33
    feeds          = [(u'Our Daily Bread', u'http://www.rbc.org/rss.ashx?id=50398')]
 
34
 
 
35
    def preprocess_html(self, soup):
 
36
        return self.adeify_images(soup)