When sending a request to Google it passes back a 200 response of an HTML error message. Graticule assumes the OK status and continues on.
When it gets to Happy Mapper it fails all of the tests for XML locations but still assumes it is XML and falls back to
This raises an exception and fails the entire process.
[2] (pry) Graticule::Geocoder::Google::Response: 0> exit
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: b line 1 and font at :1.
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: td line 1 and font at :1.
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: tr line 1 and font at :1.
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: table line 1 and font at :1.
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: div line 1 and font at :1.
Fatal error: AttValue: " or ' expected at :1.
Fatal error: attributes construct error at :1.
Fatal error: Couldn't find end of Start Tag font line 1 at :1.
Fatal error: Opening and ending tag mismatch: body line 1 and font at :1.
Fatal error: Opening and ending tag mismatch: html line 1 and b at :1.
Fatal error: Extra content at the end of the document at :1.
LibXML::XML::Error: Fatal error: Extra content at the end of the document at /Users/travis/.rvm/gems/[email protected]/gems/happymapper-0.4.0/lib/happymapper.rb:95.
from /Users/travis/.rvm/gems/[email protected]/gems/happymapper-0.4.0/lib/happymapper.rb:95:in `parse'
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Sorry...</title>
<style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style>
</head>
<body>
<div>
<table>
<tr>
<td>
<b>
<font face=times color=#0039b6 size=10>G</font>
<font face=times color=#c41200 size=10>o</font>
<font face=times color=#f3c518 size=10>o</font>
<font face=times color=#0039b6 size=10>g</font>
<font face=times color=#30a72f size=10>l</font>
<font face=times color=#c41200 size=10>e</font>
</b>
</td>
<td style="text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%">
<div style="border-bottom: 1px solid #dfdfdf;">Sorry...</div>
</td>
</tr>
</table>
</div>
<div style="margin-left: 4em;">
<h1>We're sorry...</h1>
<p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.</p>
</div>
<div style="margin-left: 4em;">See <a href="https://support.google.com/websearch/answer/86640">Google Help</a> for more information.<br/><br/></div>
<div style="text-align: center; border-top: 1px solid #dfdfdf;">© 2013 Google - <a href="https://www.google.com">Google Home</a></div>
</body>
</html>