Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by ww (Archbishop)
on May 25, 2011 at 12:17 UTC ( [id://906640]=note: print w/replies, xml ) Need Help??


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

What is this? Your fourth question about using Scrappy?

I need to change the tracks on my bulldozer. How can i do this using Scrappy module? And when I get the tracks changed, I'm going to use the 'dozer to sew up a new napkin. Would someone please also give me the code for doing that?

Use a tool that works for the work you're trying to do!

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

Replies are listed 'Best First'.
Re^2: POST method in Scrappy module doesn't return Http::Response object
by wfsp (Abbot) on May 25, 2011 at 15:02 UTC
    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.

      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"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://906640]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found