Sync to trunk.

This commit is contained in:
John Schember 2011-05-16 18:21:47 -04:00
commit a3aa8047c9
3 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,34 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1305567197(BasicNewsRecipe):
title = u'Cosmopolitan.de'
__author__ = 'schuster'
oldest_article = 7
language = 'de'
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_javascript = True
cover_url = 'http://www.cosmopolitan.com/cm/shared/site_images/print_this/cosmopolitan_logo.gif'
remove_tags_before = dict(name = 'h1', attrs={'class':'artikel'})
remove_tags_after = dict(name ='div', attrs={'class':'morePages'})
extra_css = '''
h2{font-family:Arial,Helvetica,sans-serif; font-size: x-small;}
h1{ font-family:Arial,Helvetica,sans-serif; font-size:x-large; font-weight:bold;}
'''
remove_tags = [ dict(id='strong'),
dict(title='strong'),
dict(name='span'),
dict(name='li', attrs={'class':'large'}),
dict(name='ul', attrs={'class':'articleImagesPortrait clearfix'}),
dict(name='p', attrs={'class':'external'}),
dict(name='a', attrs={'target':'_blank'}),]
feeds = [ (u'Komplett', u'http://www.cosmopolitan.de/rss/allgemein.xml'),
(u'Mode', u'http://www.cosmopolitan.de/rss/mode.xml'),
(u'Beauty', u'http://www.cosmopolitan.de/rss/beauty.xml'),
(u'Liebe&Sex', u'http://www.cosmopolitan.de/rss/liebe.xml'),
(u'Psychologie', u'http://www.cosmopolitan.de/rss/psychologie.xml'),
(u'Job&Karriere', u'http://www.cosmopolitan.de/rss/job.xml'),
(u'Lifestyle', u'http://www.cosmopolitan.de/rss/lifestyle.xml'),
(u'Shopping', u'http://www.cosmopolitan.de/rss/shopping.xml'),
(u'Bildergalerien', u'http://www.cosmopolitan.de/rss/bildgalerien.xml')]

View File

@ -0,0 +1,31 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1305547242(BasicNewsRecipe):
title = u'Good House Keeping'
language = 'en'
__author__ = 'Anonymous'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_javascript = True
def print_version(self,url):
segments = url.split('/')
printURL = '/'.join(segments[0:3]) + '/print-this/' + '/'.join(segments[4:])
return printURL
def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup
feeds = [ (u'Recipes & Entertaining', u'http://www.goodhousekeeping.com/food/food-rss/?src=rss'),
(u'Home & House', u'http://www.goodhousekeeping.com/home/home-rss/?src=rss'),
(u'Diet & Health', u'http://www.goodhousekeeping.com/health/health-rss/?src=rss'),
(u'Beauty & Style', u'http://www.goodhousekeeping.com/beauty/beauty-rss/?src=rss'),
(u'Family & Pets', u'http://www.goodhousekeeping.com/family/family-rss/?src=rss'),
(u'Saving Money', u'http://www.goodhousekeeping.com/money/money-rss/?src=rss'),
]

View File

@ -1100,7 +1100,7 @@ class StoreAmazonKindleStore(StoreBase):
class StoreAmazonDEKindleStore(StoreBase):
name = 'Amazon DE Kindle'
description = _('Kindle books form Amazon.de.')
description = _('Kindle books from Amazon.de.')
actual_plugin = 'calibre.gui2.store.amazon_de_plugin:AmazonDEKindleStore'
class StoreAmazonUKKindleStore(StoreBase):