Skip to content

Commit

Permalink
Added headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Aug 15, 2018
1 parent c3d6c41 commit e3aff6b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scraper.rb
Expand Up @@ -39,7 +39,19 @@
# date_lodged_link = search_page.link_with(text: 'Date Lodged')
p "Clicking Date Lodged tab"
# agent.redirect_ok = false
search_page = agent.submit(search_form)
search_page = agent.submit(search_form, nil, {
'Host' => 'online.unley.sa.gov.au'',
'Connection' => 'keep-alive',
'Cache-Control' => 'max-age=0',
'Origin' => 'https://online.unley.sa.gov.au',
'Upgrade-Insecure-Requests' => '1',
'Content-Type' => 'application/x-www-form-urlencoded',
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Referer' => 'https://online.unley.sa.gov.au/ePathway/Production/Web/GeneralEnquiry/EnquirySearch.aspx',
'Accept-Encoding' => 'gzip, deflate, br',
'Accept-Language' => 'en-US,en;q=0.9'
})
# agent.redirect_ok = true
p "Searching"
Expand Down

0 comments on commit e3aff6b

Please sign in to comment.