Webqq/Client/Remote/_prepare_for_login.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 15 CC 3 SCAR 24.8
CC
3
Cov
0%
Mojo::Webqq::Client::_prepare_for_login
12.0
CRAP 12.0
1 sub Mojo::Webqq::Client::_prepare_for_login {
2 my $self = shift;
3 $self->info( "初始化 " . $self->type . " 客户端...\n" );
4 $self->http_get("http://" . $self->domain . "/",{ua_debug_res_body=>0});
5 my $api_url = 'https://xui.ptlogin2.qq.com/cgi-bin/xlogin?daid=164&target=self&style=40&pt_disable_pwd=1&mibao_css=m_webqq&appid=501004106&enable_qlogin=0&no_verifyimg=1&s_url=http%3A%2F%2F' . $self->domain . '%2Fproxy.html&f_url=loginerroralert&strong_login=1&login_state=10&t=20131024001';
6 my $headers ={ Referer => 'http://'. $self->domain . '/',ua_debug_res_body=>0 };
7 my $content = $self->http_get( $api_url, $headers);
8 return 0 unless defined $content;
9 $self->pt_login_sig($self->search_cookie("pt_login_sig")) if not $self->pt_login_sig;
10 return 1;
11 }
12 1;