Skip to content

Commit

Permalink
Update scraper.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezpolley committed Oct 20, 2023
1 parent 40456f8 commit 5b9ddd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# This endpoint is not "protected" by Kasada
url = "https://cdn.plan.sa.gov.au/public-notifications/getpublicnoticessummary"
response = agent.get(url)
rescue Mechanize::ResponseCodeError => errorResponse
puts "Encountered error code #{errorResponse#response_code}"
puts "Body:\n#{errorResponse#page}
end
applications = JSON.parse(response.body)
applications.each do |application|
record = {
Expand Down

0 comments on commit 5b9ddd0

Please sign in to comment.