| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2011, Darko Miletic <darko.miletic at gmail.com>' |
| 3 |
''' |
| 4 |
cvecezla.wordpress.com |
| 5 |
''' |
| 6 |
|
| 7 |
import re |
| 8 |
|
| 9 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 10 |
|
| 11 |
|
| 12 |
class CveceZla(BasicNewsRecipe): |
| 13 |
title = 'Cvece zla i naopakog' |
| 14 |
__author__ = 'Darko Miletic' |
| 15 |
description = 'Haoticnost razmisljanja poradja haoticnost pisanja. Muzika, stripovi, igre, knjige, generalno glupiranje...' |
| 16 |
oldest_article = 7 |
| 17 |
max_articles_per_feed = 100 |
| 18 |
language = 'sr' |
| 19 |
encoding = 'utf-8' |
| 20 |
no_stylesheets = True |
| 21 |
use_embedded_content = False |
| 22 |
publication_type = 'blog' |
| 23 |
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif} .article_description{font-family: sans1, sans-serif} img{display: block } ' # noqa: E501 |
| 24 |
|
| 25 |
conversion_options = {'comment': description, 'tags': 'igre, muzika, film, blog, Srbija', 'publisher': 'Mehmet Krljic', 'language': language} |
| 26 |
|
| 27 |
preprocess_regexps = [(re.compile('\u0110'), lambda match: '\u00d0')] # noqa: RUF039 |
| 28 |
|
| 29 |
remove_tags_before = dict(attrs={'class': 'navigation'}) |
| 30 |
remove_tags_after = dict(attrs={'class': 'commentlist'}) |
| 31 |
remove_tags = [ |
| 32 |
dict(attrs={'class': ['postmetadata alt', 'sharedaddy sharedaddy-dark sd-like-enabled sd-sharing-enabled', 'reply', 'navigation']}), |
| 33 |
dict(attrs={'id': 'respond'}), |
| 34 |
] |
| 35 |
|
| 36 |
feeds = [('Clanci', 'http://cvecezla.wordpress.com/feed/')] |
| 37 |
|
| 38 |
def preprocess_html(self, soup): |
| 39 |
for item in soup.findAll(style=True): |
| 40 |
del item['style'] |
| 41 |
return soup |