File Coverage

blib/lib/Mojo/Webqq/Client/Remote/_prepare_for_login.pm
Criterion Covered Total %
statement 0 9 0.0
branch 0 4 0.0
condition n/a
subroutine 0 1 0.0
pod n/a
total 0 14 0.0


line stmt bran cond sub pod time code
1             sub Mojo::Webqq::Client::_prepare_for_login {
2 0     0     my $self = shift;
3 0           $self->info( "初始化 " . $self->type . " 客户端...\n" );
4 0           $self->http_get("http://" . $self->domain . "/",{ua_debug_res_body=>0});
5 0           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 0           my $headers ={ Referer => 'http://'. $self->domain . '/',ua_debug_res_body=>0 };
7 0           my $content = $self->http_get( $api_url, $headers);
8 0 0         return 0 unless defined $content;
9 0 0         $self->pt_login_sig($self->search_cookie("pt_login_sig")) if not $self->pt_login_sig;
10 0           return 1;
11             }
12             1;