2
__copyright__ = '2011, Darko Miletic <darko.miletic at gmail.com>'
7
from calibre.web.feeds.news import BasicNewsRecipe
9
class TechCrunch(BasicNewsRecipe):
11
__author__ = 'Darko Miletic'
12
description = 'IT News'
13
publisher = 'AOL Inc.'
16
max_articles_per_feed = 200
19
use_embedded_content = False
21
remove_empty_feeds = True
22
publication_type = 'newsportal'
23
masthead_url = 'http://s2.wp.com/wp-content/themes/vip/tctechcrunch2/images/site-logo.png'
25
body{font-family: Helvetica,Arial,sans-serif }
26
img{margin-bottom: 0.4em; display:block}
29
conversion_options = {
30
'comment' : description
32
, 'publisher' : publisher
33
, 'language' : language
36
remove_tags = [dict(name=['meta','link'])]
37
remove_attributes=['lang']
39
dict(name='h1', attrs={'class':'headline'})
40
,dict(attrs={'class':['author','post-time','body-copy']})
43
feeds = [(u'News', u'http://feeds.feedburner.com/TechCrunch/')]
45
def preprocess_html(self, soup):
46
for item in soup.findAll(style=True):
48
for item in soup.findAll('a'):
49
limg = item.find('img')
50
if item.string is not None:
58
str = self.tag_to_string(item)
60
for item in soup.findAll('img'):
61
if not item.has_key('alt'):