New recipes for Kamera Bild, The Luminous Landscape and The Online photographer by Darko Miletic

This commit is contained in:
Kovid Goyal 2010-01-31 13:39:10 -07:00
parent 60a01b6965
commit 50a8fe4a50
5 changed files with 124 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

View File

@ -0,0 +1,46 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
www.kamerabild.se
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Kamerabild(BasicNewsRecipe):
title = 'Kamera & Bild'
__author__ = 'Darko Miletic'
description = 'Photo News from Sweden'
publisher = 'politiken.dk'
category = 'news, photograph, Sweden'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
use_embedded_content = False
encoding = 'utf8'
language = 'sv'
extra_css = ' body{font-family: Verdana,Arial,Helvetica,sans-serif } .title{font-weight: bold} .pricerunnerAdContainer{border-bottom: 1px solid; border-top: 1px solid; margin-top: 0.5em; margin-bottom: 0.5em} .elementTeaserKicker{font-weight: bold; color: #AE0A10} '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [(u'Articles', u'http://www.kamerabild.se/cmlink/Nyheter-fran-KAMERA-BILD-1.43315.xml')]
keep_only_tags = [dict(name='div',attrs={'class':'container'})]
remove_tags_after = dict(name='div',attrs={'class':'editor'})
remove_tags = [
dict(name=['object','link','iframe'])
,dict(name='div',attrs={'class':['pricerunner_head','sideBar','img']})
]
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return self.adeify_images(soup)

View File

@ -0,0 +1,37 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
luminous-landscape.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class theluminouslandscape(BasicNewsRecipe):
title = 'The Luminous Landscape'
__author__ = 'Darko Miletic'
description = 'A photography news and information website in the form of a weblog with multiple authors who write on a variety of photography and art-photography related issues.'
publisher = 'The Luminous Landscape '
category = 'news, blog, photograph, international'
oldest_article = 15
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
use_embedded_content = True
encoding = 'cp1252'
language = 'en'
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [(u"What's new", u'http://www.luminous-landscape.com/whatsnew/rssfeed.php')]
remove_tags = [dict(name=['object','link','iframe'])]
def preprocess_html(self, soup):
return self.adeify_images(soup)

View File

@ -0,0 +1,41 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
theonlinephotographer.typepad.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class theonlinephotographer(BasicNewsRecipe):
title = 'The Online Photographer'
__author__ = 'Darko Miletic'
description = 'A photography news and information website in the form of a weblog with multiple authors who write on a variety of photography and art-photography related issues.'
publisher = 'The Online Photographer'
category = 'news, blog, photograph, international'
oldest_article = 15
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
use_embedded_content = False
encoding = 'utf8'
language = 'en'
extra_css = ' body{font-family: Georgia,"Times New Roman",serif } '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [(u'Articles', u'http://feeds.feedburner.com/typepad/ZSjz')]
remove_tags_before = dict(name='h3',attrs={'class':'entry-header'})
remove_tags_after = dict(name='div',attrs={'class':'entry-footer'})
remove_tags = [dict(name=['object','link','iframe'])]
def preprocess_html(self, soup):
return self.adeify_images(soup)