39 lines
809 B
Python
39 lines
809 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 = []
|
|
#hier mit beautifulsoup events rausholen und in liste packen
|
|
events = BeautifulSoup.text
|
|
#in einer Schleife durch BS
|
|
#ermittel jedes event
|
|
ort = 'Witzhausen'
|
|
datum = '31.12.2099'
|
|
event_url = 'https://foo.de'
|
|
titel = 'Fooneral'
|
|
veranstalter = 'Spezis'
|
|
|
|
event = [ort, titel, datum, veranstalter, event_url]
|
|
events.append(event)
|
|
|
|
return events
|