diff --git a/mkz-programm/scrape.rb b/mkz-programm/scrape.rb index 76ad4c0..e81e55b 100644 --- a/mkz-programm/scrape.rb +++ b/mkz-programm/scrape.rb @@ -40,6 +40,9 @@ while url elsif date =~ /(\d+)\.(\d+)\.(\d+)\s*-\s*(\d+)\.(\d+)\.(\d+)/ ev.start = Time::local $3.to_i, $2.to_i, $1.to_i, 0, 0, 0 ev.end = Time::local $6.to_i, $5.to_i, $4.to_i, 23, 59, 59 + elsif date =~ /(\d+)\.(\d+)\.(\d+),\s*(\d+):(\d+)/ + ev.start = Time::local $3.to_i, $2.to_i, $1.to_i, $4.to_i, $5.to_i, 0 + ev.end = ev.start + 7200 else puts "Unrecognized date: #{date}" next