下面是一个场景:我需要连接到一个网站来检索用XML格式的电子实验室结果。为了连接,我需要使用数字证书。
我已经在Perl中获得了这个版本。看起来是这样的:
#!/usr/bin/env perl
use strict;
use WWW::Mechanize;
$|++;
my $username = 'xxx';
my $password = 'yyy';
$ENV{HTTPS_PKCS12_FILE} = 'CERTFILE.pfx';
$ENV{HTTPS_PKCS12_PASSWORD} = 'PathCert';
my $mech = WWW::Mechanize->new();
$mech->agent_alias('Windows IE 6');
$mech->get("https://www.example.org/xyz/,DanaInfo=999.33.1.10+");
$mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=Login&Mode=Silent&UserID=xxx&Password=yyy,DanaInfo=999.33.1.10");
$mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=HL7&Query=NewRequests,DanaInfo=999.33.1.10");
print $mech->content();现在,当我在我的工作站上运行它时,这是可行的。然而:
所以,这里有很多问题。有人有什么想法吗?
发布于 2010-02-05 00:45:51
我不知道您的perl问题是怎么回事。然而,对于Python的机械化可以找到这里。
https://stackoverflow.com/questions/2204252
复制相似问题