How to use WWW:Mechanize to login

前端 未结 2 1870
情话喂你
情话喂你 2021-01-26 05:44

I want to login to a persian blogging service . This is my code:

#!/usr/bin/perl

use WWW::Mechanize;

$mech = WWW::Mechanize->new();
$url =  \"http://blogfa.         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-26 06:16

    The problem is, that WWW:Mechanize does not execute javascript. Since the site you want to log in uses javascript for logging in, its not able to do that.

    You could fix that problem by using WWW::Mechanize::Firefox, which allows you to execute javascript.

提交回复
热议问题