1 import generic_news_rss_renderer
4 class wsj_rss_renderer(generic_news_rss_renderer.generic_news_rss_renderer):
5 def __init__(self, name_to_timeout_dict, feed_site, feed_uris, page_title):
6 super(wsj_rss_renderer, self).__init__(
7 name_to_timeout_dict, feed_site, feed_uris, page_title
11 def debug_prefix(self):
12 return "wsj(%s)" % (self.page_title)
14 def get_headlines_page_prefix(self):
15 return "wsj-%s" % (self.page_title)
17 def get_details_page_prefix(self):
18 return "wsj-details-%s" % (self.page_title)
20 def find_image(self, item):
21 image = item.findtext("image")
23 url = image.get("url")
27 def should_use_https(self):
30 def item_is_interesting_for_headlines(self, title, description, item):
31 if self.is_item_older_than_n_days(item, 7):
32 self.debug_print("%s: is too old!" % title)
34 return "WSJ.com" not in title and "WSJ.com" not in description
36 def item_is_interesting_for_article(self, title, description, item):
37 if self.is_item_older_than_n_days(item, 7):
38 self.debug_print("%s: is too old!" % title)
40 return "WSJ.com" not in title and "WSJ.com" not in description
44 # x = wsj_rss_renderer(
46 # "Shuffle News" : 1},
48 # [ "/rss/RSSWorldNews.xml" ],
50 # if x.fetch_news() == 0:
51 # print "Error fetching news, no items fetched."