Skip to content

Commit

Permalink
Updated extraction of notice date to properly split string
Browse files Browse the repository at this point in the history
  • Loading branch information
muzza1976 committed Sep 29, 2020
1 parent 86d909d commit 5bbb841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -13,8 +13,8 @@

page.search('.listing-results+.list-container .list-item-container a').each do |application|
detail_page = agent.get(application.attributes['href'].to_s)
notice_date = application.search('p').inner_text.strip.split(/Final da(y|te) of notice: /)[2]
header = detail_page.search('h1.oc-page-title').inner_text.strip.to_s
notice_date = application.search('p').inner_text.strip.split(/: /)[1]
council_reference = header.split(/(.*) - (.*)/)[2]
unless council_reference
council_reference = header.split(/(.* )(P[0-9]+\/[0-9]+)/)[2]
Expand Down

0 comments on commit 5bbb841

Please sign in to comment.