1 import generic_news_rss_renderer as gnrss
5 class bellevue_reporter_rss_renderer(gnrss.generic_news_rss_renderer):
6 def __init__(self, name_to_timeout_dict, feed_site, feed_uris, page_title):
7 super(bellevue_reporter_rss_renderer, self).__init__(
8 name_to_timeout_dict, feed_site, feed_uris, page_title
12 def debug_prefix(self):
13 return "bellevue_reporter(%s)" % (self.page_title)
15 def get_headlines_page_prefix(self):
16 return "bellevue-reporter"
18 def get_details_page_prefix(self):
19 return "bellevue-reporter-details"
21 def should_use_https(self):
24 def munge_description(self, description):
25 description = re.sub("<[^>]+>", "", description)
27 "Bellevue\s+Reporter\s+Bellevue\s+Reporter", "", description
29 description = re.sub("\s*\-\s*Your local homepage\.\s*", "", description)
32 def item_is_interesting_for_headlines(self, title, description, item):
33 if self.is_item_older_than_n_days(item, 10):
34 self.debug_print("%s: is too old!" % title)
37 title.find("NFL") != -1
38 or re.search("[Ll]ive [Ss]tream", title) != None
39 or re.search("[Ll]ive[Ss]tream", title) != None
40 or re.search("[Ll]ive [Ss]tream", description) != None
42 self.debug_print("%s: looks like it's about football." % title)
46 def item_is_interesting_for_article(self, title, description, item):
47 if self.is_item_older_than_n_days(item, 10):
48 self.debug_print("%s: is too old!" % title)
51 title.find(" NFL") != -1
52 or re.search("[Ll]ive [Ss]tream", title) != None
53 or re.search("[Ll]ive[Ss]tream", title) != None
54 or re.search("[Ll]ive [Ss]tream", description) != None
56 self.debug_print("%s: looks like it's about football." % title)
62 # x = bellevue_reporter_rss_renderer(
64 # "Shuffle News" : 1},
65 # "www.bellevuereporter.com",
69 # <DIV style="padding:8px;
71 # -webkit-column-break-inside:avoid;"><P>
72 # <B>Task force will tackle issues of racial justice, police reform</B>
73 # <BR>Bellevue Reporter
74 # Bellevue Reporter - Your local homepage.
75 # Inslee names civil rights activists, pastors, and cops to panel that may forge ideas f#or new laws Task force will tackle issues of racial justice, police reform
78 # d = x.munge_description(d)
80 # if x.fetch_news() == 0:
81 # print "Error fetching news, no items fetched."