Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Attribute (file) does not pass the type constraint because: Validation + failed fo r 'Str' with value undef at C:/Perl/site/lib/Scrappy/Session.pm line 7 +3 Scrappy::Session::write('Scrappy::Session=HASH(0x2d3dd94)') ca +lled at C: /Perl/site/lib/Scrappy/Session.pm line 90 Scrappy::Session::auto_write('Scrappy::Session=HASH(0x2d3dd94) +') called at C:/Perl/site/lib/Scrappy/Session.pm line 64 Scrappy::Session::stash('Scrappy::Session=HASH(0x2d3dd94)', 'c +ookies', ' HASH(0x31eaed4)') called at C:/Perl/site/lib/Scrappy/Scraper.pm line 3 +71 Scrappy::Scraper::__ANON__(0, 'ASPSESSIONIDSCSASSTD', 'PDMJJNF +CMCINKPNGC MGPNBIM', '/', 'www.alobebe.com.br', undef, 1, undef, undef, 1, 'HASH( +0x31ef47c) ') called at C:/Perl/site/lib/HTTP/Cookies.pm line 532 HTTP::Cookies::scan('HTTP::Cookies=HASH(0x2e8ba74)', 'CODE(0x3 +1182bc)') called at C:/Perl/site/lib/Scrappy/Scraper.pm line 391 Scrappy::Scraper::get('Scrappy=HASH(0x2e80c9c)', 'URI::URL=ARR +AY(0x2fd33 ec)') called at D:\sun\Scrappy\scrap_sam.pl line 10
MY CODE: use Scrappy; use URI::URL; my $scraper=Scrappy->new; $url1=URI::URL->new('http://www.alobebe.com.br'); my $var=$scraper->get($url1); $scraper->store('foo.html');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get method in Scrappy module is not working for some sites
by Anonymous Monk on May 13, 2011 at 07:40 UTC | |
by shivanisai (Initiate) on May 13, 2011 at 07:51 UTC |