mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Merge branch 'master' of https://github.com/jony0008/calibre
This commit is contained in:
commit
eb7d2be3b1
@ -1,35 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__license__ = 'GPLv3'
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class AdvancedUserRecipe1311446032(BasicNewsRecipe):
|
||||
title = 'Corren'
|
||||
__author__ = 'Jonas Svensson'
|
||||
description = 'News from Sweden'
|
||||
publisher = 'Corren'
|
||||
category = 'news, politics, Sweden'
|
||||
oldest_article = 2
|
||||
delay = 1
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
encoding = 'iso-8859-1'
|
||||
language = 'sv'
|
||||
|
||||
feeds = [
|
||||
|
||||
(u'Toppnyheter', u'http://www.corren.se/inc/RssHandler.ashx?id=4122151&ripurl=http://www.corren.se/nyheter/'),
|
||||
(u'Ekonomi', u'http://www.corren.se/inc/RssHandler.ashx?id=4122176&ripurl=http://www.corren.se/ekonomi/'),
|
||||
(u'Link\xf6ping', u'http://www.corren.se/inc/RssHandler.ashx?id=4122234'),
|
||||
(u'Åsikter', u'http://www.corren.se/inc/RssHandler.ashx?id=4122223,4122224,4122226,4122227,4122228,4122229,4122230')
|
||||
]
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'id': 'article'}), dict(
|
||||
name='div', attrs={'class': 'body'})]
|
||||
remove_tags = [
|
||||
dict(name='ul', attrs={'class': 'functions'}), dict(name='a', attrs={'href': 'javascript*'}), dict(
|
||||
name='div', attrs={'class': 'box'}), dict(name='div', attrs={'class': 'functionsbottom'})
|
||||
]
|
Binary file not shown.
Before Width: | Height: | Size: 820 B |
@ -1,43 +0,0 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.kamerabild.se
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class Kamerabild(BasicNewsRecipe):
|
||||
title = 'Kamera & Bild'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Photo News from Sweden'
|
||||
publisher = 'politiken.dk'
|
||||
category = 'news, photograph, Sweden'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
use_embedded_content = False
|
||||
encoding = 'utf8'
|
||||
language = 'sv'
|
||||
|
||||
extra_css = ' body{font-family: Verdana,Arial,Helvetica,sans-serif } .title{font-weight: bold} .pricerunnerAdContainer{border-bottom: 1px solid; border-top: 1px solid; margin-top: 0.5em; margin-bottom: 0.5em} .elementTeaserKicker{font-weight: bold; color: #AE0A10} ' # noqa
|
||||
|
||||
conversion_options = {
|
||||
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
|
||||
}
|
||||
|
||||
feeds = [
|
||||
(u'Articles', u'http://www.kamerabild.se/cmlink/Nyheter-fran-KAMERA-BILD-1.43315.xml')]
|
||||
keep_only_tags = [dict(name='div', attrs={'class': 'container'})]
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'editor'})
|
||||
remove_tags = [
|
||||
dict(name=['object', 'link', 'iframe']), dict(name='div',
|
||||
attrs={'class': ['pricerunner_head', 'sideBar', 'img']})
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return self.adeify_images(soup)
|
Loading…
x
Reference in New Issue
Block a user