Commit 5330f6dd authored by Zach Osman's avatar Zach Osman

using ordereddict to maintain order while filtering data into days

parent e234f85b
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from datetime import datetime from datetime import datetime
import requests import requests
import collections
_MONTH_DICT = { _MONTH_DICT = {
"January": 1, "January": 1,
...@@ -95,7 +97,7 @@ def convertTime(stri): # this function is used for splicing the event times. ...@@ -95,7 +97,7 @@ def convertTime(stri): # this function is used for splicing the event times.
raise Exception("Issue with time dilation. Input string: " + stri) raise Exception("Issue with time dilation. Input string: " + stri)
def filter_data_into_days(dictlist): def filter_data_into_days(dictlist):
day_dict = {} day_dict = collections.OrderedDict()
for event in dictlist: for event in dictlist:
if "error" in event: if "error" in event:
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment