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

37 lines
762 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A parser to get events of Bahn.de out of their e-mails
'''
'''
A parser to get events of Bahn.de out of their e-mails
'''
class Bahn:
'''
@param input must be string with html
@return all events as list
'''
@staticmethod
def getEvents(html):
events = []
#hier mit beautifulsoup events rausholen und in liste packen
#in einer Schleife durch BS
#ermittel jedes event
eventLoc = 'Berlin FooDamm'
eventDate = 'ISOSTRING für ein Datum'
eventUrl = 'https://foo.de'
eventTitel = 'PArty am FooDamm'
event = [eventLoc, eventDate, eventUrl, eventTitel]
events.append(event)
return events