nog.infio.mirror/src/Mail/parser/ICSC.py

36 lines
755 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
'''
A parser to get events from ICSC out of their e-mails
'''
'''
A parser to get events of ICSC out of their e-mails
'''
class ICSC:
'''
@param input must be string with html
@return all events as list
'''
@staticmethod
def getEvents(html):
events = []
soup = BeautifulSoup(html, 'lxml')
event = soup
#hier mit beautifulsoup events rausholen und in liste packen
#in einer Schleife durch BS
#ermittel jedes event
print(events)
print(soup)
#Hier endet die Schleife und jeder einzelne event wir der Liste event hinzugefügt
events.append(event)
return events