line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
sub Mojo::Webqq::Client::_get_vfwebqq { |
2
|
0
|
|
|
0
|
|
|
my $self = shift; |
3
|
0
|
|
|
|
|
|
$self->info("获取数据验证参数...\n"); |
4
|
0
|
|
|
|
|
|
my $api_url = 'https://s.web2.qq.com/api/getvfwebqq'; |
5
|
0
|
|
|
|
|
|
my @query_string = ( |
6
|
|
|
|
|
|
|
ptwebqq => $self->ptwebqq, |
7
|
|
|
|
|
|
|
clientid => $self->clientid, |
8
|
|
|
|
|
|
|
psessionid => $self->psessionid, |
9
|
|
|
|
|
|
|
t => time(), |
10
|
|
|
|
|
|
|
); |
11
|
0
|
|
|
|
|
|
my $headers = { |
12
|
|
|
|
|
|
|
Referer => 'https://s.web2.qq.com/proxy.html?v=20130916001&callback=1&id=1', |
13
|
|
|
|
|
|
|
json => 1, |
14
|
|
|
|
|
|
|
ua_request_timeout => 10, |
15
|
|
|
|
|
|
|
ua_retry_times => 3, |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $json = $self->http_get($self->gen_url($api_url,@query_string),$headers); |
19
|
0
|
0
|
|
|
|
|
return undef unless defined $json; |
20
|
0
|
0
|
|
|
|
|
if($json->{retcode}!=0){ |
21
|
0
|
|
|
|
|
|
$self->error("获取数据验证参数失败..."); |
22
|
0
|
|
|
|
|
|
return 0; |
23
|
|
|
|
|
|
|
} |
24
|
0
|
|
|
|
|
|
$self->vfwebqq($json->{result}{vfwebqq}); |
25
|
0
|
|
|
|
|
|
return 1; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
1; |