mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hankyoreh by Seongkyoun Yoo. Fixes #876125 (add news recipe for korean hankyoreh)
This commit is contained in:
parent
1b3fe07468
commit
6d7ba7dfad
50
recipes/hankyoreh.recipe
Normal file
50
recipes/hankyoreh.recipe
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2011, Seongkyoun Yoo <seongkyoun.yoo at gmail.com>'
|
||||||
|
'''
|
||||||
|
Profile to download The Hankyoreh
|
||||||
|
'''
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
|
|
||||||
|
class Hankyoreh(BasicNewsRecipe):
|
||||||
|
title = u'Hankyoreh'
|
||||||
|
language = 'ko'
|
||||||
|
description = u'The Hankyoreh News articles'
|
||||||
|
__author__ = 'Seongkyoun Yoo'
|
||||||
|
oldest_article = 5
|
||||||
|
recursions = 1
|
||||||
|
max_articles_per_feed = 5
|
||||||
|
no_stylesheets = True
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name='tr', attrs={'height':['60px']}),
|
||||||
|
dict(id=['fontSzArea'])
|
||||||
|
]
|
||||||
|
remove_tags = [
|
||||||
|
dict(target='_blank'),
|
||||||
|
dict(name='td', attrs={'style':['padding: 10px 8px 5px 8px;']}),
|
||||||
|
dict(name='iframe', attrs={'width':['590']}),
|
||||||
|
]
|
||||||
|
remove_tags_after = [
|
||||||
|
dict(target='_top')
|
||||||
|
]
|
||||||
|
feeds = [
|
||||||
|
('All News','http://www.hani.co.kr/rss/'),
|
||||||
|
('Politics','http://www.hani.co.kr/rss/politics/'),
|
||||||
|
('Economy','http://www.hani.co.kr/rss/economy/'),
|
||||||
|
('Society','http://www.hani.co.kr/rss/society/'),
|
||||||
|
('International','http://www.hani.co.kr/rss/international/'),
|
||||||
|
('Culture','http://www.hani.co.kr/rss/culture/'),
|
||||||
|
('Sports','http://www.hani.co.kr/rss/sports/'),
|
||||||
|
('Science','http://www.hani.co.kr/rss/science/'),
|
||||||
|
('Opinion','http://www.hani.co.kr/rss/opinion/'),
|
||||||
|
('Cartoon','http://www.hani.co.kr/rss/cartoon/'),
|
||||||
|
('English Edition','http://www.hani.co.kr/rss/english_edition/'),
|
||||||
|
('Specialsection','http://www.hani.co.kr/rss/specialsection/'),
|
||||||
|
('Hanionly','http://www.hani.co.kr/rss/hanionly/'),
|
||||||
|
('Hkronly','http://www.hani.co.kr/rss/hkronly/'),
|
||||||
|
('Multihani','http://www.hani.co.kr/rss/multihani/'),
|
||||||
|
('Lead','http://www.hani.co.kr/rss/lead/'),
|
||||||
|
('Newsrank','http://www.hani.co.kr/rss/newsrank/'),
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user