I want to fill out a web form using Perl. I am having trouble finding the right syntax for this. Like in, how can I go to the URL, select the form, fill out the form and press the enter key to make sure it has been submitted?
Something like WWW :: Mechanize :: FormFiller ?
WWW :: Mechanize , and his friends are the way to go. There are a few examples in Spidering Hacks , but you will also find much more in the search query for the module name.
Good luck :)
WWW:: :: Shell:
perl -MWWW::Mechanize::Shell -e shell get http://some/page fillout ... submit
"script" something.pl - . .
Request the URL of the form form using Net::HTTPor something (you can’t remember the exact module) and include the form fields as the GET/ parameter POST(depending on the form).
Net::HTTP
GET
POST
HTML :: Form works well too.
Module synopsis is a great example:
use HTML::Form; $form = HTML::Form->parse($html, $base_uri); $form->value(query => "Perl"); use LWP::UserAgent; $ua = LWP::UserAgent->new; $response = $ua->request($form->click);
Source: https://habr.com/ru/post/1705942/More articles:Duplicate strings when using orderby, Skip () and Take () using LINQ - c #Finding Duplicate iPhone Applications - iphone.NET JIT assemblies in shared pages - .netclass or identifier - jqueryHow do two or more processes interact with a keyboard? - c ++CSS: совместимы ли классы и идентификаторы? - cssIPhone Ideas for iPhone? - iphoneIs file fragmentation of the mdf file a problem? - sql-serverHow to prevent hackers from using Apache → Available sites → The default file is apacheIE Input Selector - jqueryAll Articles