Parent Directory | Revision Log
added support for DokuWiki (not superb, but working)
1 | #!/usr/bin/perl |
2 | |
3 | use warnings; |
4 | use strict; |
5 | |
6 | package Grep::Source::DokuWiki; |
7 | |
8 | =head1 NAME |
9 | |
10 | Grep::Source::DokuWiki - scraiper for DokuWiki search results |
11 | |
12 | =head1 BUGS |
13 | |
14 | Since DokuWiki html isn't structured enough (there is no block element |
15 | around content of page, sic!), search results contain form elements and |
16 | buttons. |
17 | |
18 | =cut |
19 | |
20 | sub content_have { |
21 | qr(generator.*DokuWiki); |
22 | } |
23 | |
24 | sub fetch { |
25 | my $self = shift; |
26 | my $parent = shift; |
27 | |
28 | $parent->scrape( |
29 | wrapper => [ qw/div class page/ ], |
30 | results => 'div', |
31 | scrape => [ qw/div class dokuwiki/ ], |
32 | ); |
33 | |
34 | } |
35 | |
36 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |