Commit fbe8f7e4 authored by Landon DeCoito's avatar Landon DeCoito
Browse files

Merge branch 'Landon' into 'master'

parsed a unique event id and placed it into the first dictionary item

See merge request !15
parents e3c5539c 469fdba1
......@@ -2,7 +2,7 @@
from bs4 import BeautifulSoup
from datetime import date, time
import requests
def load_data():
Parses the XML from Mason and mines 2 BTC.
......@@ -87,8 +87,8 @@ def load_data():
entry_title = entry.title.text
entry_content = entry.content.text
uniqueid =
#makes it easy to find as things may be unevenly spaced
entry_content = entry_content.replace("\n\n\n" , "\n")
entry_content = entry_content.replace("\n\n" , "\n")
......@@ -179,8 +179,9 @@ def load_data():
raise eventException("failed to find and account for date element in entry_detailes list")
uniqueid = uniqueid[-9:]
if "Fairfax Campus" in location:
location = location.split(", Fairfax Campus")
campus = "Fairfax"
......@@ -233,8 +234,9 @@ def load_data():
print description
print "----------------------------------------------------------------------------"
dictlist.append({"title":entry_title, "dayofweek":day, "dayofmonth":monthday, "month":month, "year":year, "timestart":timestart, "timestop":timestop, "location":location, "description":description})
dictlist.append({"id":uniqueid, "title":entry_title, "dayofweek":day, "dayofmonth":monthday, "month":month, "year":year, "timestart":timestart, "timestop":timestop, "location":location, "description":description})
return dictlist
#everything in the house is fuzzy, stupid dogs were acting like pollinators, if that's how you even spell it
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