achillean/shodan-ruby

502 Bad Gateway when searching

sirhopcount opened this issue · 0 comments

Hi,

I just installed the shodan gem and using the examples in the readme I get an "502 Bad Gateway" error.

https://api.shodan.io/shodan/host/search?key=XXX&page=2&query=cisco-ios
 (JSON::ParserError)gems/json-1.8.1/lib/json/common.rb:155:in `parse': 757: unexpected token at '<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

If I use the URL in a browser I do get search results back. I am doing something wrong ?