File Coverage

blib/lib/WWW/Crawl4AI/Strategy/Plain.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 2 3 66.6
total 17 18 94.4


line stmt bran cond sub pod time code
1             package WWW::Crawl4AI::Strategy::Plain;
2             # ABSTRACT: cheapest Crawl4AI strategy — headless text mode, no escalation
3 2     2   10 use Moo;
  2         3  
  2         9  
4 2     2   567 use WWW::Crawl4AI::Request ();
  2         10  
  2         232  
5             with 'WWW::Crawl4AI::Strategy';
6              
7             our $VERSION = '0.001';
8              
9              
10 64     64 1 250 sub name { 'crawl4ai_plain' }
11              
12              
13 25     25 1 383 sub cost_class { 'cheap' }
14              
15              
16             sub build_request {
17 25     25 0 42 my ( $self, $crawler, $url ) = @_;
18 25         70 return $self->_request(
19             $url,
20             browser => { text_mode => WWW::Crawl4AI::Request::JSON_true() },
21             );
22             }
23              
24             1;
25              
26             __END__