Sha256: 2a05dd47591cf53de2bbec47d3a368e26be98713d7a325dec001beaf8e505847
Contents?: true
Size: 545 Bytes
Versions: 8
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true require "json" require "uri" module Miteru class Feeds class PhishStats < Feed URL = "https://phishstats.info:2096/api/phishing?_sort=-id&size=100" 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 private def url_for(path) URI(URL + path) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems