I am trying to parse results from duckduckgo search with Net::HTTP and store the links of the results of the array. However the result comes as a string. Any idea how get it any other type of data back as result or how to get the links from the string if there is no option to get the response in another type?
def getlinks(str, num_results)
uri = URI.parse("https://duckduckgo.com/?q=#{str}")
response = Net::HTTP.get_response(uri)
end