Skip to content

Commit

Permalink
Added token setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Aug 15, 2018
1 parent e36e636 commit 5e03d67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scraper.rb
Expand Up @@ -15,7 +15,13 @@
# a.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

p "Getting first page"
first_page = agent.get url
p "Getting first page againg with a js= token"
p first_page.body.split(/js=\d+/)[1]
url_query = url + first_page.body.split(/js=\d+/)[1]
first_page = agent.get url_query

p first_page.title.strip
first_page_form = first_page.forms.first
# select the "List of Development Applications" radio button
Expand Down

0 comments on commit 5e03d67

Please sign in to comment.