From 581ecb67b1678a250307d04d13f470884fbd01e8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Oct 2015 15:53:29 +0530 Subject: [PATCH] Update Komputerra --- recipes/kompiutierra.recipe | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/recipes/kompiutierra.recipe b/recipes/kompiutierra.recipe index 0bfa2b7df3..8d260b5016 100644 --- a/recipes/kompiutierra.recipe +++ b/recipes/kompiutierra.recipe @@ -2,15 +2,15 @@ # -*- coding: utf-8 -*- __license__ = 'GPL v3' -__copyright__ = '2010, Vadim Dyadkin, dyadkin@gmail.com' -__author__ = 'Vadim Dyadkin' +__copyright__ = '2015, lcd1232, malexey1984@gmail.com' +__author__ = 'lcd1232' from calibre.web.feeds.news import BasicNewsRecipe class Computerra(BasicNewsRecipe): title = u'\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0440\u0430' oldest_article = 100 - __author__ = 'Vadim Dyadkin (edited by A. Chewi)' + __author__ = 'lcd1232' max_articles_per_feed = 50 use_embedded_content = False remove_javascript = True @@ -20,18 +20,15 @@ class Computerra(BasicNewsRecipe): language = 'ru' description = u'Компьютерра: все новости про компьютеры, железо, новые технологии, информационные технологии' - keep_only_tags = [dict(name='div', attrs={'id': 'content'}),] - feeds = [(u'Компьютерра-Онлайн', 'http://feeds.feedburner.com/ct_news/'),] remove_tags = [ - dict(name='div', attrs={'id': ['fin', 'idc-container', 'idc-noscript',]}), - dict(name='ul', attrs={'class': "related_post"}), - dict(name='p', attrs={'class': 'info'}), - dict(name='a', attrs={'class': 'twitter-share-button'}), - dict(name='a', attrs={'type': 'button_count'}), - dict(name='h2', attrs={}) + dict(name='div', attrs={'class': ['article-soc', 'article-tags', 'also', 'item-article item-article-also', 'item-ban-700']}), + dict(name='div', attrs={'id': 'form'}) ] - def print_version(self, url): - return url + '?print=true' + keep_only_tags = [ + dict(name='div', attrs={'class': 'main-column main-column-article'}), + dict(name='div', attrs={'id': 'posts'}) + ] + cover_url = 'https://pp.vk.me/c628429/v628429830/19a22/mlm_LC_ZEa4.jpg'