Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (61 sloc) 3.16 kb
695b7ea6 » tom
2011-08-03 Initial commit based on calibre 0.8.12
1 # -*- coding: utf-8 -*-
2 #!/usr/bin/env python
3
4 __license__ = 'GPL v3'
5 __copyright__ = u'2011, Silviu Cotoar\u0103'
6 '''
7 tvmania.ro
8 '''
9
10 from calibre.web.feeds.news import BasicNewsRecipe
11
12 class Tvmania(BasicNewsRecipe):
13 title = u'TVmania'
14 __author__ = u'Silviu Cotoar\u0103'
15 description = u'Programe TV'
16 publisher = u'TVmania'
c784c8c0 » Tom
2012-01-20 Updated to calibre 0.8.36
17 oldest_article = 25
695b7ea6 » tom
2011-08-03 Initial commit based on calibre 0.8.12
18 language = 'ro'
c784c8c0 » Tom
2012-01-20 Updated to calibre 0.8.36
19 max_articles_per_feed = 100
695b7ea6 » tom
2011-08-03 Initial commit based on calibre 0.8.12
20 no_stylesheets = True
21 use_embedded_content = False
22 category = 'Ziare,Reviste,TV'
23 encoding = 'utf-8'
24 cover_url = 'http://www.tvmania.ro/wp-content/themes/tvmania/images/logo.png'
25
26 conversion_options = {
27 'comments' : description
28 ,'tags' : category
29 ,'language' : language
30 ,'publisher' : publisher
31 }
32
33 extra_css = '''
34 h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
35 h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
36 .byline {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;}
37 .date {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;}
38 p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
39 .copyright {font-family:Arial,Helvetica,sans-serif;font-size:xx-small;text-align:center}
40 .story{font-family:Arial,Helvetica,sans-serif;font-size:small;}
41 .entry-asset asset hentry{font-family:Arial,Helvetica,sans-serif;font-size:small;}
42 .pagebody{font-family:Arial,Helvetica,sans-serif;font-size:small;}
43 .maincontentcontainer{font-family:Arial,Helvetica,sans-serif;font-size:small;}
44 .story-body{font-family:Arial,Helvetica,sans-serif;font-size:small;}
45 body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
46 '''
47
48 keep_only_tags = [
49 dict(name='div', attrs={'class':'articol'})
50 , dict(name='font', attrs={'class':'mic'})
51 , dict(name='div', attrs={'id':'header_recomandari'})
52 , dict(name='div', attrs={'class':'main-image'})
53 , dict(name='div', attrs={'id':'articol_recomandare'})
54
55 ]
56
57 remove_tags = [
58 dict(name='div', attrs={'class':['iLikeThis']})
59 , dict(name='span', attrs={'class':['tag-links']})
60 ]
61
62 remove_tags_after = [
63 dict(name='div', attrs={'class':['iLikeThis']})
64 , dict(name='span', attrs={'class':['tag-links']})
65 ]
66
67 feeds = [
68 (u'Feeds', u'http://www.tvmania.ro/feed')
69 ]
70
71 def preprocess_html(self, soup):
72 return self.adeify_images(soup)
Something went wrong with that request. Please try again.