mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improve 168 ora
This commit is contained in:
parent
7384cc87e6
commit
da20ff6502
@ -1,33 +1,45 @@
|
|||||||
#!/usr/bin/env python
|
# -*- coding: utf-8 -*-
|
||||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
import re
|
||||||
from __future__ import with_statement
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
class hu168ora(BasicNewsRecipe):
|
||||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
title = u'168 óra'
|
||||||
__docformat__ = 'restructuredtext en'
|
__author__ = u'István Papp'
|
||||||
|
description = u'A 168 óra friss hírei'
|
||||||
|
timefmt = ' [%Y. %b. %d., %a.]'
|
||||||
|
oldest_article = 7
|
||||||
|
language = 'hu'
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
class H168(BasicNewsRecipe):
|
use_embedded_content = False
|
||||||
title = u'168\xf3ra'
|
encoding = 'utf8'
|
||||||
oldest_article = 4
|
publisher = u'Telegráf Kiadó'
|
||||||
max_articles_per_feed = 50
|
category = u'news, hírek, 168'
|
||||||
language = 'hu'
|
extra_css = 'body{ font-family: Verdana,Helvetica,Arial,sans-serif } .lead{font-weight: bold} h2{text-align: center; text-transform: uppercase} '
|
||||||
|
preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
|
||||||
__author__ = 'Ezmegaz'
|
remove_tags_before = dict(id='cikk_fejlec')
|
||||||
|
remove_tags_after = dict(id='szoveg')
|
||||||
feeds = [(u'Itthon',
|
remove_tags = [dict(id='box_toolbar')]
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_itthon.xml'), (u'Gl\xf3busz',
|
remove_javascript = True
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_globusz.xml'), (u'Punch',
|
remove_empty_feeds = True
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_punch.xml'), (u'Arte',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_arte.xml'), (u'Buxa',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_buxa.xml'), (u'Sebess\xe9g',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_sebesseg.xml'), (u'Tud\xe1s',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_tudas.xml'), (u'Sport',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_sport.xml'), (u'V\xe9lem\xe9ny',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_velemeny.xml'), (u'Dolce Vita',
|
|
||||||
u'http://www.168ora.hu/static/rss/cikkek_dolcevita.xml'), (u'R\xe1di\xf3',
|
|
||||||
u'http://www.168ora.hu/static/rss/radio.xml')]
|
|
||||||
|
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Itthon', u'http://www.168ora.hu/static/rss/cikkek_itthon.xml')
|
||||||
|
,(u'Glóbusz', u'http://www.168ora.hu/static/rss/cikkek_globusz.xml')
|
||||||
|
,(u'Punch', u'http://www.168ora.hu/static/rss/cikkek_punch.xml')
|
||||||
|
,(u'Arte', u'http://www.168ora.hu/static/rss/cikkek_arte.xml')
|
||||||
|
,(u'Buxa', u'http://www.168ora.hu/static/rss/cikkek_buxa.xml')
|
||||||
|
,(u'Sebesség', u'http://www.168ora.hu/static/rss/cikkek_sebesseg.xml')
|
||||||
|
,(u'Tudás', u'http://www.168ora.hu/static/rss/cikkek_tudas.xml')
|
||||||
|
,(u'Sport', u'http://www.168ora.hu/static/rss/cikkek_sport.xml')
|
||||||
|
,(u'Vélemény', u'http://www.168ora.hu/static/rss/cikkek_velemeny.xml')
|
||||||
|
,(u'Dolce Vita', u'http://www.168ora.hu/static/rss/cikkek_dolcevita.xml')
|
||||||
|
,(u'Rádió', u'http://www.168ora.hu/static/rss/radio.xml')
|
||||||
|
]
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
url += '?print=1'
|
||||||
|
return url
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user