Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Correct link to put in my WWW:Mechanize

by Anonymous Monk
on Mar 12, 2022 at 18:56 UTC ( #11142037=note: print w/replies, xml ) Need Help??


in reply to Re^2: Correct link to put in my WWW:Mechanize
in thread Correct link to put in my WWW:Mechanize

Just to clarify, I am using the correct link case-wise (http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/), but for some reason, in the error it says cgi-bin/MEMBRAIN.cgi I guess it comes from the script as I see it in the source -> <tt class='inlinecode'>&lt;form name=&quot;myform&quot; action=&quot;/cgi-bin/MEMBRAIN.cgi&quot; method=&quot;post&quot;</tt>

Replies are listed 'Best First'.
Re^4: Correct link to put in my WWW:Mechanize
by Anonymous Monk on Mar 12, 2022 at 18:59 UTC
    Sorry Rolf, I am a bit confused. In my script, I write:
    my $url = 'http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/';

    and, in the source of the page I see:
    <form name="myform" action="/cgi-bin/MEMBRAIN.cgi" method="post" onSub +mit="javascript: return checkform();">

    Do these two need to be combined perhaps somehow?
      > Sorry Rolf, I am a bit confused. In my script, I write:
      'my $url = 'http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/';'

      That's not the code you showed us.

      > and, in the source of the page I see:
      <form name="myform" action="/cgi-bin/MEMBRAIN.cgi" method="post" onSubmit="javascript: return checkform();">

      you are confusing two things:

      1. the static page you open in your browser to see the form
      2. the CGI you can submit your form parameters to.
      Which one do you want to mechanize? I can't tell.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        I guess this is where I am confused, as to what do I need to specify in the URL so I can force the page to run using my data. I thought it was enough to put:
        my $url = 'http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/'; my $mech = WWW::Mechanize->new (timeout=>1000); $mech->post($url); #$mech->get($url);

        but it fails to run with the error: Error POSTing http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi: Internal Server Error or Error GETing http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi: Internal Server Error
        I even tried: my $url=http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi, still error...
      Also, this one does not point somewhere: http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/cgi-bin/MEMBRAIN.cgi --> The requested URL /bioinf/MemBrain/cgi-bin/MEMBRAIN.cgi was not found on this server.
        It's

        http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi

        for the form's CGI!

        ... but without submitted form parameters it'll only return an error.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2023-01-31 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?