| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
__license__ = 'GPL v3' |
| 5 |
__copyright__ = '2011, Silviu Cotoar\u0103' |
| 6 |
''' |
| 7 |
intrefete.ro |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class Intrefete(BasicNewsRecipe): |
| 14 |
title = '\u00centre fete' |
| 15 |
__author__ = 'Silviu Cotoar\u0103' |
| 16 |
description = 'Petrece ziua cu stil, afl\u0103 ce e nou \u00eentre fete' |
| 17 |
publisher = 'Intre fete' |
| 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,Reviste,Femei' |
| 24 |
encoding = 'utf-8' |
| 25 |
cover_url = 'http://storage0.dms.mpinteractiv.ro/media/2/1401/16788/5878693/5/logo.jpg?width=300' |
| 26 |
|
| 27 |
conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher} |
| 28 |
|
| 29 |
keep_only_tags = [dict(name='div', attrs={'class': 'article'})] |
| 30 |
|
| 31 |
remove_tags = [dict(name='div', attrs={'class': ['author']}), dict(name='div', attrs={'class': ['tags']}), dict(name='iframe', attrs={'scrolling': ['no']})] |
| 32 |
|
| 33 |
remove_tags_after = [dict(name='iframe', attrs={'scrolling': ['no']})] |
| 34 |
|
| 35 |
feeds = [('Feeds', 'http://www.intrefete.ro/rss/')] |
| 36 |
|
| 37 |
def preprocess_html(self, soup): |
| 38 |
return self.adeify_images(soup) |