Skip to content

Commit

Permalink
fix dcc scraper when events are planned for next year
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesndrs committed Oct 29, 2024
1 parent 67c589c commit 1bc41fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ingestors/dcc_ingestor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def process_dcc(url)
event.start = Time.zone.parse(start_str[0])
event.end = Time.zone.parse(start_str[1])
end
if event.start < Time.zone.now - 2.weeks
event.start = event.start.change(year: Time.now.year + 1)
event.end = event.end.change(year: Time.now.year + 1)
end

event.venue = event_data.css('ul.post-item__meta > li')[1].text.strip

Expand Down
File renamed without changes.

0 comments on commit 1bc41fd

Please sign in to comment.