App-Zapzi
view release on metacpan or search on metacpan
"Email::Simple::Creator" : "0",
"Encode" : "0",
"Exporter" : "0",
"File::HomeDir" : "0",
"File::MMagic" : "1.30",
"Getopt::Lucid" : "1.05",
"HTML::Element" : "0",
"HTML::Entities" : "0",
"HTML::ExtractMain" : "0.63",
"HTML::TreeBuilder" : "0",
"HTTP::CookieJar" : "0",
"HTTP::Tiny" : "0",
"IO::All" : "0",
"IO::Interactive" : "0",
"Module::Find" : "0.11",
"Moo" : "1.003000",
"Moo::Role" : "0",
"Path::Tiny" : "0",
"Pod::Find" : "0",
"Pod::Html" : "0",
"SQL::Translator" : "0",
Email::Simple::Creator: '0'
Encode: '0'
Exporter: '0'
File::HomeDir: '0'
File::MMagic: '1.30'
Getopt::Lucid: '1.05'
HTML::Element: '0'
HTML::Entities: '0'
HTML::ExtractMain: '0.63'
HTML::TreeBuilder: '0'
HTTP::CookieJar: '0'
HTTP::Tiny: '0'
IO::All: '0'
IO::Interactive: '0'
Module::Find: '0.11'
Moo: '1.003000'
Moo::Role: '0'
Path::Tiny: '0'
Pod::Find: '0'
Pod::Html: '0'
SQL::Translator: '0'
Makefile.PL view on Meta::CPAN
"Email::Simple::Creator" => 0,
"Encode" => 0,
"Exporter" => 0,
"File::HomeDir" => 0,
"File::MMagic" => "1.30",
"Getopt::Lucid" => "1.05",
"HTML::Element" => 0,
"HTML::Entities" => 0,
"HTML::ExtractMain" => "0.63",
"HTML::TreeBuilder" => 0,
"HTTP::CookieJar" => 0,
"HTTP::Tiny" => 0,
"IO::All" => 0,
"IO::Interactive" => 0,
"Module::Find" => "0.11",
"Moo" => "1.003000",
"Moo::Role" => 0,
"Path::Tiny" => 0,
"Pod::Find" => 0,
"Pod::Html" => 0,
"SQL::Translator" => 0,
Makefile.PL view on Meta::CPAN
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::HomeDir" => 0,
"File::MMagic" => "1.30",
"File::Spec" => 0,
"Getopt::Lucid" => "1.05",
"HTML::Element" => 0,
"HTML::Entities" => 0,
"HTML::ExtractMain" => "0.63",
"HTML::TreeBuilder" => 0,
"HTTP::CookieJar" => 0,
"HTTP::Tiny" => 0,
"IO::All" => 0,
"IO::Handle" => 0,
"IO::Interactive" => 0,
"IPC::Open3" => 0,
"Module::Find" => "0.11",
"Moo" => "1.003000",
"Moo::Role" => 0,
"Path::Tiny" => 0,
"Pod::Find" => 0,
lib/App/Zapzi/Fetchers/URL.pm view on Meta::CPAN
use utf8;
use strict;
use warnings;
our $VERSION = '0.017'; # VERSION
use Carp;
use Data::Validate::URI 0.06;
use HTTP::Tiny;
use HTTP::CookieJar;
use Moo;
with 'App::Zapzi::Roles::Fetcher';
sub name
{
return 'URL';
}
lib/App/Zapzi/Fetchers/URL.pm view on Meta::CPAN
my $v = Data::Validate::URI->new();
my $url = $v->is_web_uri($source) || $v->is_web_uri('http://' . $source);
return $url;
}
sub fetch
{
my $self = shift;
my $jar = HTTP::CookieJar->new;
my $http = HTTP::Tiny->new(cookie_jar => $jar);
my $url = $self->source;
my $response = $http->get($url, $self->_http_request_headers());
if (! $response->{success} || ! length($response->{content}))
{
my $error = "Failed to fetch $url: ";
if ($response->{status} == 599)
{
( run in 1.543 second using v1.01-cache-2.11-cpan-e9199f4ba4c )