Commit 3bb91ef1 authored by Landon DeCoito's avatar Landon DeCoito

starting cleanup function and further defined Event class

parent 5b5af7fc
print "and we begin"
class event:
def __init__(self):
self.__name = "nameplaceholder"
self.__description = "contentplaceholder"
class Event:
def __init__(self, entryTag): #where var entrySoup is a specific event tag
self.__name = entryTag.find('title').string
self.__description = entryTag.find('content').string
self.__time = "timeplaceholder"
self.__date = "dateplaceholder"
self.__location = "locationplaceholder"
def __str__(self):
return self.__name + ": " + self.__description + "\n\n"
def cleanup(string):
ctr = 0
while ctr < len(string):
from bs4 import BeautifulSoup
import requests
......@@ -32,6 +38,8 @@ for item in entries:
print titles, "\n"
events = []
for item in entries:
print item.find('content').prettify(), "\n"
events.append(Event(item))
print events
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