Skip to content

Commit

Permalink
Update scraper.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
BfB-Schenefeld committed Apr 21, 2024
1 parent 25d4c14 commit 270af48
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def scrape_calendar_data(year, month)

if date_raw && time && meeting && location
# Extract and format the date
day_part = date_raw[/\D+/] # Extract non-digit characters
day_part = date_raw[/\D+/].strip # Extract non-digit characters and strip any extra whitespace
date_part = date_raw[/\d+/] # Extract digit characters
date = "#{day_part}#{date_part.rjust(2, '0')}" # Combine and ensure two digits for date
date = "#{day_part} #{date_part.rjust(2, '0')}" # Combine with a space and ensure two digits for date

puts "Date: #{date}, Time: #{time}, Meeting: #{meeting}, Location: #{location}, URL: #{link_full_url}"
end
Expand All @@ -51,4 +51,3 @@ def scrape_calendar_data(year, month)

# Example: Scrape data for April 2024
scrape_calendar_data(2024, 4)

0 comments on commit 270af48

Please sign in to comment.