Skip to content

Commit

Permalink
Fix refetch problem
Browse files Browse the repository at this point in the history
  • Loading branch information
bonflintstone committed Nov 1, 2024
1 parent b3618d9 commit 95bd340
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 29 deletions.
2 changes: 1 addition & 1 deletion app/services/fetch_baeckerei.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.call
link = event_row.css("a.event-thumb").attr("href").value
description = event_row.css(".event-thumb__excerpt").text.strip

Event.create(datetime:, location:, name:, link:, description:, organization: "Die Bäckerei").valid?
Event.create(datetime:, location:, name:, link:, description:, organization: "Die Bäckerei", source: :scraper)
end
end
end
2 changes: 1 addition & 1 deletion app/services/fetch_brux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def self.call
description = event_row.css("p").text.strip
location = "Brux"

Event.create(datetime:, location:, name:, link:, description:, organization: "Brux")
Event.create(datetime:, location:, name:, link:, description:, organization: "Brux", source: :scraper)
end
end
end
2 changes: 1 addition & 1 deletion app/services/fetch_haus_der_musik.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.call
location = event_row.css(".stats .stat:nth-child(2) strong").text
link = "https://www.haus-der-musik-innsbruck.at" + event_row.css(".info a").attr("href").value

Event.create(datetime:, location:, name:, link:, description:, organization: "Haus der Musik").errors
Event.create(datetime:, location:, name:, link:, description:, organization: "Haus der Musik", source: :scraper)
end
end
end
2 changes: 1 addition & 1 deletion app/services/fetch_leokino.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.call
link = "https://leokino.at" + movie_row.css("td:last-child h3 a").attr("href").value
description = movie_row.css("td:last-child p:last-child").text.sub("[ mehr ]", "").strip

Event.create(datetime:, location:, name:, link:, description:, organization: "Leokino")
Event.create(datetime:, location:, name:, link:, description:, organization: "Leokino", source: :scraper)
end
end
end
22 changes: 0 additions & 22 deletions app/services/fetch_musik_hall.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/services/fetch_theater_praesent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.call
description = ""
link = "https://kupfticket.com/shops/theater-praesent"

Event.create(datetime:, location: "Theater Praesent", name: title, link:, description:, organization: "Theater Praesent")
Event.create(datetime:, location: "Theater Praesent", name: title, link:, description:, organization: "Theater Praesent", source: :scraper)
end
end
end
2 changes: 1 addition & 1 deletion app/services/fetch_tiroler_landestheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.call
location = event_row.css(".info > span:first-child").text
description = event_row.css("h4 + span").text

Event.create(datetime:, name:, link:, location:, description:, organization: "Tiroler Landestheater")
Event.create(datetime:, name:, link:, location:, description:, organization: "Tiroler Landestheater", source: :scraper)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/fetch_treibhaus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.call
description = event_row.css(".share-sub").text.strip
location = "Treibhaus"

Event.create(datetime:, location:, name:, link:, description:, organization: "Treibhaus")
Event.create(datetime:, location:, name:, link:, description:, organization: "Treibhaus", source: :scraper)
end
end
end

0 comments on commit 95bd340

Please sign in to comment.