4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
6
www.smashingmagazine.com
1
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
9
2
from calibre.web.feeds.news import BasicNewsRecipe
11
class SmashingMagazine(BasicNewsRecipe):
12
title = 'Smashing Magazine'
13
__author__ = 'Darko Miletic'
14
description = 'We smash you with the information that will make your life easier, really'
17
max_articles_per_feed = 100
19
use_embedded_content = False
20
publisher = 'Smashing Magazine'
21
category = 'news, web, IT, css, javascript, html'
24
conversion_options = {
25
'comments' : description
27
,'publisher' : publisher
30
keep_only_tags = [dict(name='div', attrs={'id':'leftcolumn'})]
31
remove_tags_after = dict(name='ul',attrs={'class':'social'})
33
dict(name=['link','object'])
34
,dict(name='h1',attrs={'class':'logo'})
35
,dict(name='div',attrs={'id':'booklogosec'})
36
,dict(attrs={'src':'http://media2.smashingmagazine.com/wp-content/uploads/images/the-smashing-book/smbook6.gif'})
39
feeds = [(u'Articles', u'http://rss1.smashingmagazine.com/feed/')]
41
def preprocess_html(self, soup):
42
for iter in soup.findAll('div',attrs={'class':'leftframe'}):
46
for item in soup.findAll('img'):
47
oldParent = item.parent
48
if oldParent.name == 'a':
49
oldParent.name = 'div'
4
class SmashingMagazine (BasicNewsRecipe):
5
__author__ = u'Marc Busqué <marc@lamarciana.com>'
6
__url__ = 'http://www.lamarciana.com'
9
__copyright__ = u'2012, Marc Busqué <marc@lamarciana.com>'
10
title = u'Smashing Magazine'
11
description = u'Founded in September 2006, Smashing Magazine delivers useful and innovative information to Web designers and developers. Our aim is to inform our readers about the latest trends and techniques in Web development. We try to persuade you not with the quantity but with the quality of the information we present. Smashing Magazine is and always has been independent.'
13
tags = 'web development, software'
15
remove_empty_feeds = True
18
cover_url = u'http://media.smashingmagazine.com/themes/smashingv4/images/logo.png'
19
remove_attributes = ['border', 'cellspacing', 'align', 'cellpadding', 'colspan', 'valign', 'vspace', 'hspace', 'alt', 'width', 'height', 'style']
20
extra_css = u'body div table:first-child {display: none;} img {max-width: 100%; display: block; margin: auto;}'
23
(u'Smashing Magazine', u'http://rss1.smashingmagazine.com/feed/'),