Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Correct link to put in my WWW:Mechanize

by bliako (Monsignor)
on Mar 13, 2022 at 17:23 UTC ( #11142072=note: print w/replies, xml ) Need Help??


in reply to Correct link to put in my WWW:Mechanize

The above  <form ...> has onSubmit="javascript: return checkform();"> AFAIU this calls a js function checkform() prior to submitting. This function may be adding extra fields to the form, e.g. "I have checked the form, fields validate, it's ok for the cgi script to process it.". By accessing the cgi script directly, you may be omitting some of these fields. For example, look at the B1=Submit field (re: Re^8: Correct link to put in my WWW:Mechanize). Where does that come from? You don't mention that field in Re^11: Correct link to put in my WWW:Mechanize. But I saw it with my browser. Is that field the important difference between a successful submission? So, you need to inspect that js function and see if and how it modifies the submitted form. Then you can call the cgi directly.

Anyway, may I suggest that you leave automation to someone who knows what they are doing lest these free resources find out that there are hundreds of failed attempts and put a captcha-wall and spoil it for the community? Not that I am the internet police or anything, just an opinion. BTW your question has nothing to do with Perl or Mech.

bw, bliako

Replies are listed 'Best First'.
Re^2: Correct link to put in my WWW:Mechanize
by LanX (Sage) on Mar 13, 2022 at 17:54 UTC
    > AFAIU this calls a js function checkform() prior to submitting.

    It's a classic JS form validator, a submission is only possible if it returns true.

    see e.g. https://www.w3schools.com/js/js_validation.asp

    > For example, look at the B1=Submit field. Where does that come from?

    I can see this with JS disabled

    <input style="font-size: 13pt" type="submit" value="Submit" name="B1">

    I don't have the impression JS is adding something to the form, frankly I doubt the author had the necessary skills to do so.

    But my advise here can only be superficial, because I don't know what the correct genetic input has to loo like. And the author decided to let his web-service simply crash, when the JS validation is bipassed to send broke input. 🤷🏽

    DISCLAIMER: I don't expect biologist to be good hackers, but academics should be capable to ask proper questions.

    ANYWAY: I agree with you that this is not really a Perl issue, it's about HTML/HTTP.

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

Re^2: Correct link to put in my WWW:Mechanize
by cavac (Priest) on Mar 15, 2022 at 12:33 UTC

    Anyway, may I suggest that you leave automation to someone who knows what they are doing lest these free resources find out that there are hundreds of failed attempts and put a captcha-wall and spoil it for the community? Not that I am the internet police or anything, just an opinion.

    Seems there is even an option to download the whole program plus data. A quick look at the zip file shows some python programs, so it would make much more sense to run a local copy and modify it to batch process (it there is not already such an option).

    perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

      yep, that would be the best option. It looks like we entered the meta-python era ...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-09-30 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (126 votes). Check out past polls.

    Notices?