Sha256: 4d5e778411d032e887dc2c7825ea1d652e1d1e39b918a1d4c524defc41e1fdba
Contents?: true
Size: 541 Bytes
Versions: 4
Compression:
Stored size: 541 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["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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
miteru-1.1.0 | lib/miteru/feeds/phishstats.rb |
miteru-1.0.2 | lib/miteru/feeds/phishstats.rb |
miteru-1.0.1 | lib/miteru/feeds/phishstats.rb |
miteru-1.0.0 | lib/miteru/feeds/phishstats.rb |