Thread: iDnes.cz news
View Single Post
Old 09-25-2010, 03:37 PM   #3
ramesses
Junior Member
ramesses began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Thank you very much. Your print_version is exactly what I needed to move on.
Here is my actual working code:
Spoiler:
Code:
class AdvancedUserRecipe1285425351(BasicNewsRecipe):
    __license__  = 'GPL v3'
    __author__  = 'Radim Pešek'
    title = u'iDnes.cz'
    publisher = u'MAFRA a.s.'
    description = 'Zprávy iDNES.cz - přehled nejnovějších událostí z domova i ze světa'
    oldest_article = 7
    max_articles_per_feed = 100
    encoding = 'cp1250'
    language = 'cs'
    cover_url = 'http://g.idnes.cz/u/loga-n4/idnes.gif'
    remove_javascript = True
    remove_tags = [dict(name='div', attrs={'class':['related', 'authors','back ico','fl','fc0','ico art-add']})]

    def print_version(self, url):
        split_url = url.split("?")
        print_url = 'http://zpravy.idnes.cz/tiskni.asp?' +  split_url[1]
        return print_url

    feeds = [(u'Z domova i ze sveta', u' http://servis.idnes.cz/rss.asp?c=zpravodaj')]

Please, can you help me how to fix bad diacritics in Section List and Article List on my Kindle (articles have correct diacritics). The website uses cp1250 encoding.
ramesses is offline   Reply With Quote