| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
__license__ = 'GPL v3' |
| 5 |
__copyright__ = '2011, Silviu Cotoar\u0103' |
| 6 |
''' |
| 7 |
monden.info |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class Monden(BasicNewsRecipe): |
| 14 |
title = 'Monden' |
| 15 |
__author__ = 'Silviu Cotoar\u0103' |
| 16 |
description = 'Arti\u015fti, interviuri, concerte.. MUZIC\u0102' |
| 17 |
publisher = 'Monden' |
| 18 |
oldest_article = 25 |
| 19 |
language = 'ro' |
| 20 |
max_articles_per_feed = 100 |
| 21 |
no_stylesheets = True |
| 22 |
use_embedded_content = False |
| 23 |
category = 'Ziare,Stiri,Muzica' |
| 24 |
encoding = 'utf-8' |
| 25 |
cover_url = 'http://www.monden.info/wp-content/uploads/2009/04/mondeninfo-logo.jpg' |
| 26 |
|
| 27 |
conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher} |
| 28 |
|
| 29 |
extra_css = ''' |
| 30 |
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;} |
| 31 |
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} |
| 32 |
.byline {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;} |
| 33 |
.date {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;} |
| 34 |
p{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 35 |
.copyright {font-family:Arial,Helvetica,sans-serif;font-size:xx-small;text-align:center} |
| 36 |
.story{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 37 |
.entry-asset asset hentry{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 38 |
.pagebody{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 39 |
.maincontentcontainer{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 40 |
.story-body{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 41 |
body{font-family:Helvetica,Arial,sans-serif;font-size:small;} |
| 42 |
''' |
| 43 |
|
| 44 |
keep_only_tags = [dict(name='div', attrs={'id': 'content'})] |
| 45 |
|
| 46 |
remove_tags = [dict(name='div', attrs={'class': ['postAuthor']}), dict(name='div', attrs={'class': ['postLike']})] |
| 47 |
|
| 48 |
remove_tags_after = [dict(name='div', attrs={'class': ['postLike']})] |
| 49 |
|
| 50 |
feeds = [('Feeds', 'http://www.monden.info/feed/')] |
| 51 |
|
| 52 |
def preprocess_html(self, soup): |
| 53 |
return self.adeify_images(soup) |