Class: Miteru::Feeds::PhishStats

Inherits:
Feed
  • Object
show all
Defined in:
lib/miteru/feeds/phishstats.rb

Constant Summary collapse

URL =
"https://phishstats.info:2096/api/phishing?_sort=-id&size=100"

Instance Method Summary collapse

Instance Method Details

#urlsObject



11
12
13
14
15
16
17
18
19
# File 'lib/miteru/feeds/phishstats.rb', line 11

def urls
  json = JSON.parse(get(URL))
  json.map do |entry|
    entry.dig("url")
  end
rescue HTTPResponseError, HTTP::Error, JSON::ParserError => e
  puts "Failed to load PhishStats feed (#{e})"
  []
end