diff --git a/scrape.py b/scrape.py index b048605..7f35deb 100644 --- a/scrape.py +++ b/scrape.py @@ -26,12 +26,14 @@ def scrape(): time = timespan.split(' ')[0] output += time - output += ' Uhr' + if time != 'Ganztags': + output += ' Uhr' output += ', ' # place - output += data[2].text.strip() - output += ', ' + if len(data) > 2: + output += data[2].text.strip() + output += ', ' # title output += '' @@ -49,9 +51,6 @@ def scrape(): return output - - - class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): current_time = time()