Created
September 19, 2021 13:06
-
-
Save Niwilai/136664af5bba41f1d48778fc6c4d94aa to your computer and use it in GitHub Desktop.
Check if given game is on PSN store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'google_search_results' | |
params = { | |
q: "#{ARGV[0]} - PS Store", | |
hl: "de", | |
gl: "de", | |
google_domain: "google.de", | |
num: 10, | |
api_key: "FAKE_KEY" | |
} | |
search = GoogleSearch.new(params) | |
hash_results = search.get_hash | |
hash_results[:organic_results].each do |entry| | |
if entry[:link].include?("store.playstation") | |
puts "#{ARGV[0]} looks like: #{entry[:title]}" | |
else | |
puts "Not found :(" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment