Monthly Archives: July 2015

Python: Problem Set 5

Problem Set 5 makes use of Google’s RSS feed to search for keywords and return stories matching those words. The exercise I believe is the first to begin using classes and inheritance. In order to avoid code duplication, a generic WordTrigger is created to look for for a “word” inside a “text.” Then, we create subclasses of triggers to look at the title, summary, or subject fields. Later on, it creates AND/OR functions to make more useful searches.

My functions passed the, but when I try using provided main_thread’s implementation that pulls RSS stories from google (stories = process(“”)), only the title trigger seemed to work. I suspect the provided may not be up to date with the RSS feed. On the other hand, looks like it is mapping the description element to “summary”, so the error is not obvious to me.