Debian Codegraph @

recipes/baltimore_sun.recipe

raw
1 from __future__ import with_statement
2
3 __license__ = 'GPL 3'
4 __copyright__ = '2009, Kovid Goyal <[email protected]>'
5 __copyright__ = '2012 Josh Hall<[email protected]>'
6 __docformat__ = 'restructuredtext en'
7
8 from calibre.web.feeds.news import BasicNewsRecipe
9
10
11 class BaltimoreSun(BasicNewsRecipe):
12 title = 'The Baltimore Sun'
13 __author__ = 'Kovid Goyal'
14 description = 'Complete local news and blogs from Baltimore'
15 language = 'en_US'
16 version = 2.5
17 compress_news_images = True
18 compress_news_images_auto_size = 8
19 oldest_article = 1
20 max_articles_per_feed = 100
21 use_embedded_content = False
22 no_stylesheets = True
23 remove_javascript = True
24 remove_empty_feeds = True
25 auto_cleanup = False
26
27 ignore_duplicate_articles = {'title'}
28 keep_only_tags = [
29 dict(name=['div'], attrs={'class': ['trb_ar_hl', 'trb_ar_hl_t', 'trb_ar_la', 'trb_ar_by', 'trb_ar_dateline', 'trb_ar_page']}),
30 ]
31 remove_tags = [
32 dict(name=['meta', 'link']),
33 ]
34
35 feeds = [
36 # News ##
37 ('Top Headlines', 'http://feeds.feedburner.com/baltimoresun/news/rss2'),
38 ('Breaking News', 'http://feeds.feedburner.com/baltimoresun/news/local/annearundel/rss2'),
39 ('Top Maryland', 'http://feeds.feedburner.com/baltimoresun/news/local/rss2'),
40 ('Baltimore City', 'http://feeds.feedburner.com/baltimoresun/news/local/baltimore_city/rss20xml'),
41 ('Education', 'http://feeds.feedburner.com/baltimoresun/news/education/rss2'),
42 ('Local Politics', 'http://feeds.feedburner.com/baltimoresun/news/local/politics/rss2'),
43 ('Weather', 'http://feeds.feedburner.com/baltimoresun/news/weather/site/rss2'),
44 ('Nation/world', 'http://feeds.feedburner.com/baltimoresun/news/nationworld/rss2'),
45 # Sports##
46 ('Top Sports', 'http://feeds.feedburner.com/baltimoresun/sports/rss2'),
47 ('Orioles/Baseball', 'http://www.baltimoresun.com/sports/orioles/rss2.0.xml'),
48 ('Ravens/Football', 'http://feeds.feedburner.com/baltimoresun/sports/football/rss2'),
49 # Entertainment ##
50 ('Arts & Theater', 'http://feeds.feedburner.com/baltimoresun/entertainment/galleriesmuseums/rss2'),
51 ('Movies', 'http://www.baltimoresun.com/entertainment/movies/rss2.0.xml'),
52 ('Music & Nightlife', 'http://www.baltimoresun.com/entertainment/music/rss2.0.xml'),
53 ('Restaurants & Food', 'http://www.baltimoresun.com/entertainment/dining/rss2.0.xml'),
54 ('TV/Media', 'http://www.baltimoresun.com/entertainment/tv/rss2.0.xml'),
55 # Life ##
56 ('Health&Wellness', 'http://www.baltimoresun.com/health/rss2.0.xml'),
57 ('Home & Garden', 'http://www.baltimoresun.com/features/home-garden/rss2.0.xml'),
58 ('Living Green', 'http://www.baltimoresun.com/features/green/rss2.0.xml'),
59 ('Fashion', 'http://www.baltimoresun.com/features/fashion/rss2.0.xml'),
60 ('Travel', 'http://www.baltimoresun.com/travel/rss2.0.xml'),
61 # Business ##
62 ('Top Business', 'http://www.baltimoresun.com/business/rss2.0.xml'),
63 ('Technology', 'http://www.baltimoresun.com/business/technology/rss2.0.xml'),
64 ('Real Estate', 'http://www.baltimoresun.com/classified/realestate/rss2.0.xml'),
65 ('Investing', 'http://www.baltimoresun.com/business/money/rss2.0.xml'),
66 # Opinion##
67 ('Sun Editorials', 'http://www.baltimoresun.com/news/opinion/editorial/rss2.0.xml'),
68 ('Op/Ed', 'http://www.baltimoresun.com/news/opinion/oped/rss2.0.xml'),
69 # News Blogs ##
70 ('InsideEd', 'http://www.baltimoresun.com/news/maryland/education/blog/rss2.0.xml'),
71 ('Maryland Politics', 'http://www.baltimoresun.com/news/maryland/politics/blog/rss2.0.xml'),
72 ('Maryland Weather', 'http://www.baltimoresun.com/news/weather/weather-blog/rss2.0.xml'),
73 ('Second Opinion', 'http://www.baltimoresun.com/news/opinion/second-opinion-blog/rss2.0.xml'),
74 ('Sun Investigates', 'http://www.baltimoresun.com/news/maryland/sun-investigates/rss2.0.xml'),
75 ("You Don't Say", 'http://www.baltimoresun.com/news/language-blog/rss2.0.xml'),
76 # Business Blogs ##
77 ('BaltTech', 'http://www.baltimoresun.com/business/technology/blog/rss2.0.xml'),
78 ('Consuming Interests', 'http://www.baltimoresun.com/business/consuming-interests-blog/rss2.0.xml'),
79 ('The Real Estate Wonk', 'http://www.baltimoresun.com/business/real-estate/wonk/rss2.0.xml'),
80 # Entertainment Blogs ##
81 ('ArtSmash', 'http://www.baltimoresun.com/entertainment/arts/artsmash/rss2.0.xml'),
82 ('Midnight Sun', 'http://www.baltimoresun.com/entertainment/music/midnight-sun-blog/rss2.0.xml'),
83 ('Read Street', 'http://www.baltimoresun.com/features/books/read-street/rss2.0.xml'),
84 ('Z on TV', 'http://www.baltimoresun.com/entertainment/tv/z-on-tv-blog/rss2.0.xml'),
85 # Life Blogs ##
86 ('Baltimore Insider', 'http://www.baltimoresun.com/features/baltimore-insider-blog/rss2.0.xml'),
87 ('Picture of Health', 'http://www.baltimoresun.com/health/blog/rss2.0.xml'),
88 # Sports Blogs ##
89 ('Orioles Insider', 'http://baltimore.feedsportal.com/c/34255/f/623100/index.rss'),
90 ('Ravens Insider', 'http://www.baltimoresun.com/sports/ravens/ravens-insider/rss2.0.xml'),
91 ('The Schmuck Stops Here', 'http://www.baltimoresun.com/sports/schmuck-blog/rss2.0.xml'),
92 ]