View Single Post
Old 05-07-2010, 09:11 AM   #1895
smargo
Member
smargo began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2007
Location: Switzerland
Device: Kindle Voyage, Kobo
Problem with my recipe for "Kommersant" Russian daily

Hi, I am trying to make a simple recipe for the best russian language newspaper Kommersant.
Here is the recipe:

Code:
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1272297716(BasicNewsRecipe):
    title          = u'Kommersant'
    oldest_article = 7
    max_articles_per_feed = 100

    feeds          = [(u'Kommersant', u'http://feeds.kommersant.ru/RSS_Export/RU/daily.xml')]


    



def print_version(self,url):

        segments = url.split('=')
        article_id = segments[1]
        newurl = 'http://www.kommersant.ru/doc-rss.aspx?DocsID=' + article_id + '&print=true'

        return newurl
but it fails with the following error log (below).

what am i doing wrong ? Thanks!

Code:
ERROR: Conversion Error: <b>Failed</b>: Fetch news from Kommersant
It seems to download the articles fine:
Code:
Fetching http://www.kommersant.ru/doc-rss.aspx?DocsID=1365119
Downloaded article: Tencent разложила DST на активы // Mail.ru, "Вконтакте" и "Одноклассникам" прописали мультипликаторы from http://www.kommersant.ru
but then fails:

Code:
lxml.etree.XMLSyntaxError: Failed to parse QName 'font-size:', line 33, column 3710
smargo is offline