| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
__license__ = 'GPL v3' |
| 5 |
__copyright__ = '2011, Silviu Cotoar\u0103' |
| 6 |
''' |
| 7 |
catavencii.ro |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class Catavencii(BasicNewsRecipe): |
| 14 |
title = 'Ca\u0163avencii' |
| 15 |
__author__ = 'Silviu Cotoar\u0103' |
| 16 |
publisher = 'Ca\u0163avencii' |
| 17 |
description = 'Ca\u0163avencii' |
| 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,Romania' |
| 24 |
encoding = 'utf-8' |
| 25 |
cover_url = 'http://www.simonatache.ro/wp-content/uploads/2011/06/catavencii-logo.png' |
| 26 |
|
| 27 |
conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher} |
| 28 |
|
| 29 |
keep_only_tags = [dict(name='div', attrs={'id': 'content'})] |
| 30 |
|
| 31 |
remove_tags = [ |
| 32 |
dict(name='div', attrs={'id': 'breadcrumbs'}), |
| 33 |
dict(name='span', attrs={'class': 'info'}), |
| 34 |
dict(name='div', attrs={'id': 'social-media-article'}), |
| 35 |
] |
| 36 |
|
| 37 |
remove_tags_after = [dict(name='div', attrs={'id': 'social-media-article'})] |
| 38 |
feeds = [('\u0218tiri', 'http://www.catavencii.ro/rss')] |
| 39 |
|
| 40 |
def preprocess_html(self, soup): |
| 41 |
return self.adeify_images(soup) |