| blib/lib/Duadua/Parser/Bot/Bytespider.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 13 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | 2 | 3 | 66.6 |
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 22 | 23 | 95.6 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Duadua::Parser::Bot::Bytespider; | ||||||
| 2 | 6 | 6 | 39 | use strict; | |||
| 6 | 13 | ||||||
| 6 | 170 | ||||||
| 3 | 6 | 6 | 28 | use warnings; | |||
| 6 | 13 | ||||||
| 6 | 148 | ||||||
| 4 | 6 | 6 | 31 | use Duadua::Util qw//; | |||
| 6 | 10 | ||||||
| 6 | 696 | ||||||
| 5 | |||||||
| 6 | sub try { | ||||||
| 7 | 201 | 201 | 1 | 383 | my ($class, $d) = @_; | ||
| 8 | |||||||
| 9 | 201 | 100 | 66 | 359 | if ( index($d->ua, 'Bytespider;') > -1 && index($d->ua, 'bytedance.com') > -1 ) { | ||
| 10 | 1 | 7 | my $h = { | ||||
| 11 | name => 'Bytespider', | ||||||
| 12 | is_bot => 1, | ||||||
| 13 | }; | ||||||
| 14 | |||||||
| 15 | 1 | 4 | return Duadua::Util->set_os($d, $h); | ||||
| 16 | } | ||||||
| 17 | } | ||||||
| 18 | |||||||
| 19 | 1; | ||||||
| 20 | |||||||
| 21 | __END__ |