Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 05-26-2011, 04:22 PM   #1
schuster
Zealot
schuster doesn't litterschuster doesn't litter
 
Posts: 116
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /K÷ln
Device: prs-650 / prs-350 /kindle 3
recipe for Rheinische Post - german

Code:
import string, re
from calibre import strftime
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
class AdvancedUserRecipe(BasicNewsRecipe):

    title          = u'RP-online'
    __author__  = 'schuster'
    oldest_article = 2
    max_articles_per_feed = 100
    no_stylesheets         = True
    use_embedded_content   = False
    language               = 'de'
    remove_javascript      = True
    masthead_url = 'http://www.die-zeitungen.de/uploads/pics/LOGO_RP_ONLINE_01.jpg'
    cover_url = 'http://www.manroland.com/com/pressinfo_images/com/RheinischePost_Logo_300dpi.jpg'
    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h4{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    img {min-width:300px; max-width:600px; min-height:300px; max-height:800px}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
	'''
    remove_tags_before = dict(id='article_content')
    remove_tags_after  = dict(id='article_content')
    remove_tags = [dict(attrs={'class':['goodies', 'left', 'right', 'clear-all', 'teaser anzeigenwerbung', 'lesermeinung', 'goodiebox', 'goodiebox 1', 'goodiebox 2', 'goodiebox 3', 'boxframe', 'link']}),
                dict(id=['click_Fotos_link']),
                dict(name=['script', 'noscript', 'style', '_top', 'click_Fotos_link'])]

    feeds          = [	(u'Top-News', u'http://www.ngz-online.de/app/feed/rss/topnews'),
		(u'Politik', u'http://www.ngz-online.de/app/feed/rss/politik'),
		(u'Wirtschaft', u'http://www.ngz-online.de/app/feed/rss/wirtschaft'),
		(u'Panorama', u'http://www.ngz-online.de/app/feed/rss/panorama'),
		(u'Sport', u'http://www.ngz-online.de/app/feed/rss/sport'),
		(u'Tour de France', u'http://www.ngz-online.de/app/feed/rss/tourdefrance'),
		(u'Fu▀ball', u'http://www.ngz-online.de/app/feed/rss/fussball'),
		(u'Fu▀ball BuLi', u'http://www.ngz-online.de/app/feed/rss/bundesliga'),
		(u'Formel 1', u'http://www.ngz-online.de/app/feed/rss/formel1'),
		(u'US-Sport', u'http://www.ngz-online.de/app/feed/rss/us-sports'),
		(u'Boxen', u'http://www.ngz-online.de/app/feed/rss/boxen'),
		(u'Eishockey', u'http://www.ngz-online.de/app/feed/rss/eishockey'),
		(u'Basketball', u'http://www.ngz-online.de/app/feed/rss/basketball'),
		(u'Handball', u'http://www.ngz-online.de/app/feed/rss/handball'),
		(u'Motorsport', u'http://www.ngz-online.de/app/feed/rss/motorsport'),
		(u'Tennis', u'http://www.ngz-online.de/app/feed/rss/tennis'),
		(u'Radsport', u'http://www.ngz-online.de/app/feed/rss/radsport'),
		(u'Kultur', u'http://www.ngz-online.de/app/feed/rss/kultur'),
		(u'Gesellschaft', u'http://www.ngz-online.de/app/feed/rss/gesellschaft'),
		(u'Wissenschaft', u'http://www.ngz-online.de/app/feed/rss/wissen'),
		(u'Gesundheit', u'http://www.ngz-online.de/app/feed/rss/gesundheit'),
		(u'Digitale Welt', u'http://www.ngz-online.de/app/feed/rss/digitale'),
		(u'Auto & Mobil', u'http://www.ngz-online.de/app/feed/rss/auto'),
		(u'Reise & Welt', u'http://www.ngz-online.de/app/feed/rss/reise'),
		(u'Beruf & Karriere', u'http://www.ngz-online.de/app/feed/rss/beruf'),
		(u'Herzrasen', u'http://www.ngz-online.de/app/feed/rss/herzrasen'),
		(u'About a Boy', u'http://www.ngz-online.de/app/feed/rss/about_a_boy'),

]
schuster is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
recipe for Express.de - german schuster Recipes 1 06-05-2011 10:58 AM
recipe for Bild.de - German schuster Recipes 1 06-03-2011 07:56 AM
recipe for Impulse.de - german schuster Recipes 0 05-18-2011 04:42 PM
recipe for Capital.de - german schuster Recipes 0 05-18-2011 04:39 PM
recipe for Golem.de - German schuster Recipes 3 05-15-2011 12:33 PM


All times are GMT -4. The time now is 03:48 AM.


MobileRead.com is a privately owned, operated and funded community.