Skip to content

Instantly share code, notes, and snippets.

@daguar
Last active December 13, 2016 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daguar/268aea5793a09b5e5ec8351b9ad32bed to your computer and use it in GitHub Desktop.
Save daguar/268aea5793a09b5e5ec8351b9ad32bed to your computer and use it in GitHub Desktop.
require 'httparty'
require 'nokogiri'
require 'pry'
page = HTTParty.get("http://lafayette.granicus.com/ViewPublisher.php?view_id=3").body
parsed_page = Nokogiri::HTML(page)
all_agenda_link_elements = parsed_page.css("a").select { |link| link.children.text == "Agenda" }
first_agenda = HTTParty.get all_agenda_link_elements[1].attributes["href"].value
binding.pry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment