/[Grep]/lib/Grep/Source/PhpWiki.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/Grep/Source/PhpWiki.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 85 - (hide annotations)
Fri Feb 23 20:47:08 2007 UTC (17 years, 3 months ago) by dpavlin
File size: 497 byte(s)
refactor most of code for scraping into common code making plugins really simple
1 dpavlin 73 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     package Grep::Source::PhpWiki;
7    
8     =head1 NAME
9    
10 dpavlin 85 Grep::Source::PhpWiki - scraiper for PhpWiki search results
11 dpavlin 73
12     =cut
13    
14     sub content_have {
15     qr(generator.*PhpWiki);
16     }
17    
18     sub fetch {
19     my $self = shift;
20     my $parent = shift;
21    
22 dpavlin 85 $parent->scrape(
23     # submit_form => {
24     # fields => {
25     # value => $parent->q,
26     # },
27     # button => 'fullsearch',
28     # },
29     wrapper => [ qw/div id FullTextSearchPlugin/ ],
30     results => 'dt',
31     scrape => [ qw/div class wikitext/ ],
32     );
33 dpavlin 73
34     }
35    
36     1;

  ViewVC Help
Powered by ViewVC 1.1.26