4
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
9
from calibre.web.feeds.news import BasicNewsRecipe
11
class TelegraphUK(BasicNewsRecipe):
12
title = u'Telegraph.co.uk'
13
__author__ = 'Darko Miletic'
14
description = 'News from United Kingdom'
16
max_articles_per_feed = 100
18
language = _('English')
19
use_embedded_content = False
22
dict(name='div', attrs={'class':'storyHead'})
23
,dict(name='div', attrs={'class':'story' })
25
remove_tags = [dict(name='div', attrs={'class':'slideshow'})]
28
(u'UK News' , u'http://www.telegraph.co.uk/news/uknews/rss' )
29
,(u'World News' , u'http://www.telegraph.co.uk/news/worldnews/rss' )
30
,(u'Politics' , u'http://www.telegraph.co.uk/news/newstopics/politics/rss' )
31
,(u'Technology News', u'http://www.telegraph.co.uk/scienceandtechnology/technology/technologynews/rss' )
32
,(u'UK News' , u'http://www.telegraph.co.uk/scienceandtechnology/technology/technologyreviews/rss')
33
,(u'Science News' , u'http://www.telegraph.co.uk/scienceandtechnology/science/sciencenews/rss' )
34
,(u'Sport' , u'http://www.telegraph.co.uk/sport/rss' )
35
,(u'Earth News' , u'http://www.telegraph.co.uk/earth/earthnews/rss' )
36
,(u'Comment' , u'http://www.telegraph.co.uk/comment/rss' )
37
,(u'How about that?', u'http://www.telegraph.co.uk/news/newstopics/howaboutthat/rss' )
3
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
8
from calibre.web.feeds.news import BasicNewsRecipe
10
class TelegraphUK(BasicNewsRecipe):
11
title = u'Telegraph.co.uk'
12
__author__ = 'Darko Miletic'
13
description = 'News from United Kingdom'
15
max_articles_per_feed = 100
19
use_embedded_content = False
22
h1{font-family :Arial,Helvetica,sans-serif; font-size:large; }
23
h2{font-family :Arial,Helvetica,sans-serif; font-size:x-small; color:#444444}
24
.story{font-family :Arial,Helvetica,sans-serif; font-size: x-small;}
25
.byline{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;}
27
.imageExtras{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;}
31
dict(name='div', attrs={'class':'storyHead'})
32
,dict(name='div', attrs={'class':'story' })
33
#,dict(name='div', attrs={'class':['slideshowHD gutterUnder',"twoThirds gutter","caption" ] })
35
remove_tags = [dict(name='div', attrs={'class':['related_links_inline',"imgindex","next","prev","gutterUnder"]})]
38
(u'UK News' , u'http://www.telegraph.co.uk/news/uknews/rss' )
39
,(u'World News' , u'http://www.telegraph.co.uk/news/worldnews/rss' )
40
,(u'Politics' , u'http://www.telegraph.co.uk/news/newstopics/politics/rss' )
41
,(u'Technology News', u'http://www.telegraph.co.uk/scienceandtechnology/technology/technologynews/rss' )
42
,(u'UK News' , u'http://www.telegraph.co.uk/scienceandtechnology/technology/technologyreviews/rss')
43
,(u'Science News' , u'http://www.telegraph.co.uk/scienceandtechnology/science/sciencenews/rss' )
44
,(u'Sport' , u'http://www.telegraph.co.uk/sport/rss' )
45
,(u'Earth News' , u'http://www.telegraph.co.uk/earth/earthnews/rss' )
46
,(u'Comment' , u'http://www.telegraph.co.uk/comment/rss' )
47
,(u'How about that?', u'http://www.telegraph.co.uk/news/newstopics/howaboutthat/rss' )
50
def get_article_url(self, article):
52
url = article.get('guid', None)
54
if 'picture-galleries' in url or 'pictures' in url or 'picturegalleries' in url :