http://qs321.pair.com?node_id=906665


in reply to Re: POST method in Scrappy module doesn't return Http::Response object
in thread POST method in Scrappy module doesn't return Http::Response object

My dad drove a bulldozer and he always sang the praises of the Scrappy module when he had to change the tracks. I think in those days the dependancy chain included sledge hammers and very long crow bars. Sadly, the code was on the back of a packet of Woodbines and I think he must have used it to light the acetylene torch (optional).

Mind you, his napkins were rubbish.

  • Comment on Re^2: POST method in Scrappy module doesn't return Http::Response object

Replies are listed 'Best First'.
Re^3: POST method in Scrappy module doesn't return Http::Response object
by shivanisai (Initiate) on May 26, 2011 at 05:35 UTC
    This is the code i have tried.
    use strict; use Scrappy; my $sess = 'sam.session'; my $scraper =Scrappy->new; -f $sess ? $scraper->session->load($sess) : $scraper->session->write($ +sess); my $mainurl="https://secure.samford.edu/php-bin/search/index.php"; my $search_url="https://secure.samford.edu/php-bin/search/dir_susearch +.php"; $scraper->get($mainurl); my $scraper1 =Scrappy->new; -f $sess ? $scraper1->session->load($sess) : $scraper1->session->write +($sess); $scraper1->post("$search_url",{ 'searchChar'=>"john", 'searchBy'=>"ball", 'roleRadioGp'=>"fall", 'submit'=>"submit" }); foreach my $key(keys %$scraper1) { print "\n$key :"; print "$scraper1->{$key}\n"; } $scraper1->logger->write('log.yml');
    In log.yml file always the error will be -- error: - eventlog: "2011-05-26 05:24:29 error error POSTing data to https://secure.samford.edu/php-bin/search/dir_susearch.php"