View Single Post
Old 02-16-2010, 07:31 AM   #1444
p4np5n
Junior Member
p4np5n began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: HTC HD2
Hi,

I am trying to create a recipe for a greek news website. The recipe so far looks like that:

Code:
from calibre.web.feeds.recipes import BasicNewsRecipe

class Kathimerini(BasicNewsRecipe):
    title                  = 'Kathimerini'
    __author__             = 'Pan'
    description            = 'News from Greece'
    oldest_article         = 2
    max_articles_per_feed  = 100
    encoding               = 'windows-1253'
    publisher              = 'Kathimerini'
    category               = 'news, GR'
    language               = 'el'

    feeds          = [
                      ('Πολιτική', 'http://wk.kathimerini.gr/xml_files/politics.xml'),
                    ]

    def print_version(self, url):
        return url.replace('http://news.kathimerini.gr/4dcgi/', 'http://news.kathimerini.gr/4dcgi/4dcgi/')
The feed I am trying it on is this:
http://wk.kathimerini.gr/xml_files/politics.xml

To get a printable view from a news item, say:
http://news.kathimerini.gr/4Dcgi/_w_...02/2010_390924

one has to add another "4Dcgi" string in the url:
http://news.kathimerini.gr/4Dcgi/4Dc...02/2010_390924
(I believe I've done it correctly. )

However, when executing the recipe, it seems to be unable to get any articles from the feed. any ideas?

Last edited by p4np5n; 02-16-2010 at 07:47 AM.
p4np5n is offline