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 03-31-2011, 02:51 PM   #1
markvdvelde
Enthusiast
markvdvelde began at the beginning.
 
Posts: 31
Karma: 12
Join Date: Jan 2011
Device: Kindle
Recipe for Financieele Dagblad

Can someone make a recipe for Het Financieele Dagblad, a Dutch financial daily? Some articles are for subscribers only, but the articles under this feed should be for free. But when I try to download them with Calibre, I always get an ebook with the line BrowserStateError("can't fetch relative reference: not viewing any document",)

Thanks a lot in advance, Mark
markvdvelde is offline   Reply With Quote
Old 03-31-2011, 06:45 PM   #2
marvin_2
Member
marvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura about
 
Posts: 12
Karma: 4472
Join Date: Jan 2011
Device: Kindle
here you go

Spoiler:
Code:

import re

from calibre.web.feeds.news import BasicNewsRecipe

class fd(BasicNewsRecipe):
    title          = u'Financieel Dagblad'
    __author__ = ''
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    cover_url = 'http://www.fd.nl/static/gfx/logo-fd-164x78.gif'
    language = 'nl'

    keep_only_tags = (dict(name = 'div', attrs = {'class': ['headlinearticle']}))
    remove_tags    = [dict(name='span' , attrs={'class':['opties']})]

    feeds          = [
                        (u'Overzicht',u'http://www.fd.nl/nieuws/overzicht/?view=RSS&profiel=OPENBAAR')

 
                     ]
    extra_css = '''
        h1 {font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:x-large;}
        p{font-family:Arial,Helvetica,sans-serif;}
        strong{font-weight:bold; margin-right:5pt;margin-top:20pt;}
        .datum_ie {font-style:italic;font-size:small;}
        img {align:left;}
        '''
Attached Files
File Type: zip financieel dagblad.zip (659 Bytes, 75 views)
marvin_2 is offline   Reply With Quote
 
Advertisement
Old 04-01-2011, 08:12 AM   #3
markvdvelde
Enthusiast
markvdvelde began at the beginning.
 
Posts: 31
Karma: 12
Join Date: Jan 2011
Device: Kindle
Wow, that was really fast. Works brilliantly! Thanks so much
markvdvelde is offline   Reply With Quote
Reply

Tags
dutch, recipe request

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 05:57 AM
I need some help with a recipe jefferson_frantz Recipes 14 11-22-2010 03:06 PM
New recipe kiklop74 Recipes 0 10-05-2010 05:41 PM
New recipe kiklop74 Recipes 0 10-01-2010 03:42 PM
Recipe Help lrain5 Calibre 3 05-09-2010 11:42 PM


All times are GMT -4. The time now is 12:02 AM.


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