View Single Post
Old 10-27-2010, 05:57 AM   #4
BlonG began at the beginning.
BlonG's Avatar
Posts: 15
Karma: 10
Join Date: Oct 2010
Location: Slovenia
Device: Kindle 3G
OK, I solved the problem.

Didn't bother with javascript, because I didn't understand that stuff. So I just searched for tags and followed other examples.

The recipe is for Slovenian newspaper ""
__license__ = 'GPL v3'
__copyright__ = '2010, BlonG'
from import BasicNewsRecipe
class Dnevnik(BasicNewsRecipe):
title = u''
__author__ = u'BlonG'
description = u"Dnevnik je časnik z več kot polstoletno zgodovino. Pod sloganom »Življenje ima besedo« na svojih straneh prinaša bralcem bogastvo informacij, komentarjev in kolumen in raznovrstnost pogledov, zaznamovanih z odgovornostjo do posameznika in širše družbe."
oldest_article = 3
max_articles_per_feed = 20
no_stylesheets = True
use_embedded_content = False

cover_url = ''

extra_css = '''
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}

html2lrf_options = ['--base-font-size', '10']

keep_only_tags = [
dict(name='div', attrs={'id':'_iprom_inStream'}),
dict(name='div', attrs={'class':'entry-content'}),

remove_tags = [
dict(name='div', attrs={'class':'fb_article_top'}),
dict(name='div', attrs={'class':'related'}),
dict(name='div', attrs={'class':'fb_article_foot'}),
dict(name='div', attrs={'class':'spreading'}),
dict(name='dl', attrs={'class':'ad'}),
dict(name='p', attrs={'class':'report'}),
dict(name='div', attrs={'class':'hfeed comments'}),
dict(name='dl', attrs={'id':'entryPanel'}),
dict(name='dl', attrs={'class':'infopush ip_wide'}),
dict(name='div', attrs={'class':'sidebar'}),
dict(name='dl', attrs={'class':'bottom'}),
dict(name='div', attrs={'id':'footer'}),

feeds = [
(u'Slovenija', u'')
,(u'Svet', u'')
,(u'EU', u'')
,(u'Poslovni dnevnik', u'')
,(u'Kronika', u'')
,(u'Kultura', u'')
,(u'Zdravje', u'')
,(u'Znanost in IT', u'')
,(u'(Ne)verjetno', u'')
,(u'E-strada', u'')
,(u'Svet vozil', u'')

If anybody has some idea how to improve this - please just comment!

Last edited by BlonG; 10-27-2010 at 11:59 PM. Reason: Managed to create recipe
BlonG is offline   Reply With Quote