Sha256: 739de0f94ee0da98ad5943fa566954485cd8370da40b10780bcf8e5555e90899
Contents?: true
Size: 490 Bytes
Versions: 1
Compression:
Stored size: 490 Bytes
Contents
require 'nokogiri' require 'httpclient' require 'ruskino33_parser/announce' require 'ruskino33_parser/movie' require "ruskino33_parser/version" require "ruskino33_parser/premiers" module Ruskino33Parser def self.fetch(url) HTTPClient.new.get url, nil, 'User-Agent' => 'a', 'Accept-Encoding' => 'a' end def self.parse(url) p = fetch url fail(Empty) if p.http_body.content.size.zero? p.status == 200 ? Nokogiri::HTML(p.body.encode('utf-8')) : fail(NotFound) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruskino33_parser-0.1.2 | lib/ruskino33_parser.rb |