class Eventify::Provider::ApolloKino

Constants

URL

Public Class Methods

fetch() click to toggle source
# File lib/eventify/provider/apollo_kino.rb, line 10
def fetch
  doc = Nokogiri::HTML(open(URI.join(URL, "eng/soon"), {"Accept-Encoding" => "gzip,deflate"}))
  doc.search(".EventList-container > div").map do |item|
    title_node = item.at("h2 a")
    url = URI.join(URL, title_node["href"]).to_s
    date = Time.strptime(item.at(".event-releaseDate b").content, "%d.%m.%Y")
    new id: url, title: title_node.content, link: url, date: date
  end
end