| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
__license__ = 'GPL v3' |
| 5 |
__copyright__ = '2011, Silviu Cotoar\u0103' |
| 6 |
''' |
| 7 |
academiacatavencu.info |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class AcademiaCatavencu(BasicNewsRecipe): |
| 14 |
title = 'Academia Ca\u0163avencu' |
| 15 |
__author__ = 'Silviu Cotoar\u0103' |
| 16 |
description = 'Academia Catavencu. Pamflete!' |
| 17 |
publisher = 'Ca\u0163avencu' |
| 18 |
oldest_article = 5 |
| 19 |
language = 'ro' |
| 20 |
max_articles_per_feed = 100 |
| 21 |
no_stylesheets = True |
| 22 |
use_embedded_content = False |
| 23 |
category = 'Ziare' |
| 24 |
encoding = 'utf-8' |
| 25 |
cover_url = 'http://www.inpolitics.ro/Uploads/Articles/academia_catavencu.jpg' |
| 26 |
|
| 27 |
conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher} |
| 28 |
|
| 29 |
keep_only_tags = [dict(name='h1', attrs={'class': 'entry-title'}), dict(name='div', attrs={'class': 'entry-content'})] |
| 30 |
|
| 31 |
remove_tags = [dict(name='div', attrs={'class': ['mr_social_sharing_wrapper']}), dict(name='div', attrs={'id': ['fb_share_1']})] |
| 32 |
|
| 33 |
remove_tags_after = [dict(name='div', attrs={'id': ['fb_share_1']})] |
| 34 |
|
| 35 |
feeds = [('Feeds', 'http://www.academiacatavencu.info/feed')] |
| 36 |
|
| 37 |
def preprocess_html(self, soup): |
| 38 |
return self.adeify_images(soup) |