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 22, 2024
1 parent f936e0b commit 7ea5272
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def scrape_top_details(top_url)
puts "Zugriff auf TOP-Seite: #{top_url}"
document = Nokogiri::HTML(open(top_url))

# Extraktion des Vorlagen-Betreffs, wenn vorhanden
# Extraktion der Vorlagen-Betreffs, wenn vorhanden
vorlagen_betreff_element = document.at_css('span#vobetreff a')
if vorlagen_betreff_element
vorlagen_betreff_text = vorlagen_betreff_element.text.strip
vorlagen_betreff_url = "https://www.sitzungsdienst-schenefeld.de/bi/#{vorlagen_betreff_element['href']}"
puts "Vorlagen-Betreff gefunden: #{vorlagen_betreff_text}, URL: #{vorlagen_betreff_url}"
[vorlagen_betreff_text, vorlagen_betreff_url]
vorlagen_url = "https://www.sitzungsdienst-schenefeld.de/bi/#{vorlagen_betreff_element['href']}"
puts "Vorlagen-Betreff gefunden: #{vorlagen_betreff_text}, Vorlagen-URL: #{vorlagen_url}"
[vorlagen_betreff_text, vorlagen_url]
else
puts "Kein Vorlagen-Betreff vorhanden."
puts "Keine Vorlage vorhanden."
["-", "-"]
end
end
Expand All @@ -57,3 +57,4 @@ def scrape_top_details(top_url)




0 comments on commit 7ea5272

Please sign in to comment.