calibre/recipes/antyweb.recipe
koliberek 6ff1c2332d Update antyweb.recipe
Division to subsections
2014-03-28 17:34:19 +01:00

50 lines
2.1 KiB
Plaintext

#-*- coding: utf-8 -*-
from calibre.web.feeds.news import BasicNewsRecipe
class AntywebRecipe(BasicNewsRecipe):
encoding = 'utf-8'
__license__ = 'GPL v3'
__author__ = u'Artur Stachecki <artur.stachecki@gmail.com>'
language = 'pl'
version = 1
title = u'Antyweb'
category = u'News'
description = u'Blog o internecie i nowych technologiach'
cover_url=''
remove_empty_feeds= True
auto_cleanup = False
no_stylesheets=True
use_embedded_content = False
oldest_article = 7
max_articles_per_feed = 100
remove_javascript = True
simultaneous_downloads = 3
ignore_duplicate_articles = {'title', 'url'} # zignoruj zduplikowane artykuły o takich samych tytułach LUB adresach
scale_news_images =True
conversion_options = { 'tags' : u'news, aplikacje mobilne, Android, iOS, Windows Phone ',
'smarten_punctuation' : True,
'publisher' : 'AntyWeb'
} # opcje konwersji.
keep_only_tags=[]
keep_only_tags.append(dict(name = 'h1'))
keep_only_tags.append(dict(name = 'div', attrs = {'class' : 'entry-cover'}))
keep_only_tags.append(dict(name = 'div', attrs = {'class' : 'news-content'}))
feeds = [
(u'Felietony', 'http://feeds.feedburner.com/AntywebFelietony'),
(u'Apple', 'http://feeds.feedburner.com/AntywebApple'),
(u'Gry', 'http://feeds.feedburner.com/AntywebGry'),
(u'Mobile', 'http://feeds.feedburner.com/AntywebMobile'),
(u'Startups', 'http://feeds.feedburner.com/AntywebStartups'),
(u'Google', 'http://feeds.feedburner.com/AntywebGoogle'),
(u'Microsoft', 'http://feeds.feedburner.com/AntywebMicrosoft')
]
def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup