As we are using our
LoadRssFeed as a library module now, we will want to modify the end result to return an array we can use in our
chart module that we will build shortly. We will return two counts both in an array, one for May and one for June.
Also, we will remove the
get_all_rss_dates function and replace it with
return [month_count.count(5), month_count.count(6)]. This will allow us to return a single object but keep two values for our chart. Here's the implementation of the file:
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib2 from xml.etree import ElementTree import time def ...