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 10-12-2010, 07:07 AM   #1
muwa
Junior Member
muwa began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Unreadable Novaya Gazeta

Hi All,

I have tried to create a recipe for Novaya Gazeta but couldn't make it work. Tried straight rss feed without any modifications. Then found the way to get printable pages (by appendig ?print=<some number> for all url requests). Neither one worked. Every time I get only one page view for entire article which is also cut on the right side. By the way, internal Calibre viewer shows entire articles but Kindle doesn't.

Can anyone help me to explain what I am doing wrong?

Thanks,
Mike
muwa is offline   Reply With Quote
Old 10-12-2010, 07:22 AM   #2
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by muwa View Post
Hi All,

I have tried to create a recipe for Novaya Gazeta but couldn't make it work. Tried straight rss feed without any modifications. Then found the way to get printable pages (by appendig ?print=<some number> for all url requests). Neither one worked. Every time I get only one page view for entire article which is also cut on the right side. By the way, internal Calibre viewer shows entire articles but Kindle doesn't.

Can anyone help me to explain what I am doing wrong?

Thanks,
Mike
You state that the internal Calibre viewer shows the entire article but the kindle does not. This leads me to believe that is is a tables issues.
Try adding this to your recipe and see if it helps.
Spoiler:

Code:
no_stylesheets = True
conversion_options = {'linearize_tables' : True}

 def preprocess_html(self, soup):
        for item in soup.findAll(attrs={'style':True}):
            del item['style']
        return soup
TonytheBookworm is offline   Reply With Quote
Advert
Old 10-12-2010, 12:41 PM   #3
muwa
Junior Member
muwa began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Everything worked like a charm. Thanks a bunch!

Here is final code:
Spoiler:

class AdvancedUserRecipe1286819935(BasicNewsRecipe):
title = u'Novaya Gazeta'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
conversion_options = {'linearize_tables' : True}

feeds = [(u'Articles', u'http://www.novayagazeta.ru/rss_number.xml')]


def preprocess_html(self, soup):
for item in soup.findAll(attrs={'style':True}):
del item['style']
return soup

def print_version(self, url):
return url + '?print=true'
muwa 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
Convert an unreadable PDF file? Lekdin Amazon Kindle 4 04-24-2010 12:40 AM
PDF unreadable on Kindle saxophone PDF 8 03-05-2010 11:29 AM
DE Book unreadable on Sony Reader...no options? mgemmons Workshop 10 08-07-2008 11:48 PM
Unreadable diagrams Laurens Sony Reader 7 10-22-2006 08:54 AM


All times are GMT -4. The time now is 08:33 PM.


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