View Single Post
Old 02-10-2013, 02:24 PM   #1
dealero
Junior Member
dealero began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2013
Device: Kindle Classic
Problem with news on calibre

Hello!

I'm trying to create a "magazine" to be used on Kindle with articles from Keypad.pl - currently I'm writing for them and I'm trying to get the recipe on calibre. This is the code:

Code:
class AdvancedUserRecipe1360415209(BasicNewsRecipe):
    title          = u'Keypad.pl'
    description = u'alternatywny portal gracza'
    language = 'pl'
    __author__ = u'Adam Kortus'
    oldest_article = 7
    max_articles_per_feed = 100
    auto_cleanup = True
    masthead_url = 'http://keypad.pl/wp-content/uploads/2012/12/logop3.png'
    cover_url= 'http://keypad.pl/wp-content/uploads/2012/12/logop3.png'
    remove_empty_feeds = True
    useHighResImages = True
    one_picture_per_article = True
    filterDuplicates = True
    remove_attributes = [ 'border', 'cellspacing', 'align', 'cellpadding', 'colspan',
                          'valign', 'vspace', 'hspace', 'alt', 'width', 'height' ]
    extra_css = 'img { text-align: center; margin: 5px auto; }'
#    remove_tags_before = [dict(attrs={'class':['entry-content']})]
#    remove_tags_after = [dict(attrs={'class':['entry-content']})]
    remove_tags = [dict(attrs={'class':[
                   'youtube-player youtuber'
                   ]})]
    remove_tags = [dict(attrs={'rel':[
                   'bookmark'
                   ]})]
    no_stylesheets = True
    feeds          = [(u'Newsy', u'http://keypad.pl/category/news/feed/'), (u'Recenzje', u'http://keypad.pl/category/recenzje/feed/'), (u'Testy', u'http://keypad.pl/category/testy/feed/'), (u'Zapowiedzi', u'http://keypad.pl/category/zapowiedzi/'), (u'Publicystyka', u'http://keypad.pl/category/publicystyka/')]
The most important problem is that some articles are there, but without content (just the title), like this one: http://keypad.pl/nowy-zwiastun-crysis-3/ . I have no idea why is it happening. I have to add that it's not because of the video inside - there is another article like that and it worked just fine. Overall 2 out of 11 articles are without any content. This is the log from downloading the news with calibre: http://shrib.com/q9OHJZJb. I'm asking for help, because I have been struggling with this issue for many hours now.

I would also like to get the visible miniatures in "Articles List" view.

Thanks for all the tips!
dealero is offline   Reply With Quote