| blib/lib/WWW/Crawl4AI/Detect.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 49 | 65 | 75.3 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 107 | 80 | 47 | 2 | $thin && $md =~ /$RE_JS/ |
| 115 | 40 | 12 | 1 | defined $page->{'success'} and not $page->{'success'} |
| 117 | 0 | 51 | 1 | $code and $code >= 500 || $SOFT_FAIL{$code} |
| 133 | 0 | 15 | 1 | $code and $code >= 500 || $SOFT_FAIL{$code} |
| 152 | 1 | 0 | 0 | defined $cdp_url and length $cdp_url |
| line | l | !l | condition |
|---|---|---|---|
| 51 | 129 | 0 | $page ||= {} |
| 52 | 129 | 0 | $page->{'markdown'} // "" |
| 53 | 2 | 111 | ($page->{'raw_html'} // $page->{'html'}) // "" |
| 54 | 28 | 101 | $page->{'title'} // "" |
| 55 | 129 | 0 | $page->{'status_code'} // 0 |
| 60 | 0 | 77 | ($page->{'final_url'} // $page->{'url'}) // "" |
| 116 | 52 | 0 | $page->{'status_code'} // 0 |
| 132 | 16 | 0 | $page->{'status_code'} // 0 |
| 147 | 0 | 0 | $timeout // 5 |
| 162 | 1 | 0 | $ENV{'CRAWL4AI_PROXY_URL'} || undef |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 53 | 16 | 2 | 111 | $page->{'raw_html'} // $page->{'html'} |
| 60 | 52 | 0 | 77 | $page->{'final_url'} // $page->{'url'} |
| 80 | 11 | 6 | 112 | $thin && $md =~ /$RE_BLOCK/ || $html =~ /$RE_WALL/ || $title =~ /$RE_TITLE/ || $final =~ /$RE_CHALLENGE_WALL/ |
| 95 | 4 | 3 | 122 | $thin && ($md =~ /$RE_CAPTCHA/ || $html =~ /$RE_CAPTCHA/) || $final =~ /$RE_CHALLENGE_CAPTCHA/ |
| 107 | 1 | 1 | 127 | $code >= 500 || $SOFT_FAIL{$code} |
| 117 | 0 | 1 | 51 | $code >= 500 || $SOFT_FAIL{$code} |
| 119 | 0 | 5 | 46 | $sig->{'js_required'} or $sig->{'blocked'} |
| 5 | 1 | 45 | $sig->{'js_required'} or $sig->{'blocked'} or $sig->{'captcha'} | |
| 1 | 12 | 33 | $sig->{'js_required'} or $sig->{'blocked'} or $sig->{'captcha'} or $sig->{'thin_html'} | |
| 133 | 1 | 1 | 14 | $code >= 500 || $SOFT_FAIL{$code} |