Commit 5b5af7fc authored by Landon DeCoito's avatar Landon DeCoito

updated Readme

parent e2178d33
Day1: the fwaque we doin?
Day1.1 : Don't stop belivin
Mason Today Web is a shitty version of the Mason Today project. It will be the conglomeration of 2 horrible programmings trying their damnedest to write functioning code.
Please refer to the requirements.txt for information on what packages to install to properly run the program.
We make soup. A lot of it.
print "and we begin"
class event:
def __init__(self):
self.__name = "nameplaceholder"
self.__description = "contentplaceholder"
self.__time = "timeplaceholder"
self.__date = "dateplaceholder"
self.__location = "locationplaceholder"
from bs4 import BeautifulSoup
import requests
#from bs4.diagnose import diagnose
f = requests.get("") #grabs the xml from 25live
#f = open("events.xml", "r") #Opens a local document. events.xml is a shortened version of the larger events doc
soup = BeautifulSoup(f.text, "lxml") #creates soup of the xml
entries = soup.find_all('entry') #creates a list of all the entry tags from the xml
print type(entries[0]), "\n" #prints the first entry
print entries[0].prettify(), "\n" #prints the first entry out
print entries[0].find('content').prettify(), "\n" #prints the first content tag in the first entry
titles = []
for item in entries:
#this iterates through the entries and puts each event's title into a list
print titles, "\n"
print titles
for item in entries:
print item.find('content').prettify(), "\n"
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