https://login.weixin.qq.com/qrcode/4fVPJo_Jkw==
window.QRLogin.uuid = "4fVPJo_Jkw==";
返回验证码:
my $api = "https://login.weixin.qq.com/qrcode/$uuid";
my $api = "https://login.weixin.qq.com/qrcode/$uuid";
my $response = $ua->get($api);
$ua->default_headers;
if ( $response->is_success ) {
$r = $response->decoded_content; # or whatever
$r = $response->decoded_content;
print "
";
}
else {
die $response->status_line;
}
my ( $fh, $filename ) =
tempfile( "weixin_qrcode_XXXX", SUFFIX => ".jpg", DIR => '/tmp' );
binmode $fh;
print $fh $r;
close $fh;
print "登录二维码已经下载到本地 [ $filename ]
";