/[Grep]/lib/Grep/Source/PunBB.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

Contents of /lib/Grep/Source/PunBB.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133 - (show annotations)
Tue May 1 20:50:14 2007 UTC (17 years ago) by dpavlin
File size: 460 byte(s)
Very experimental support for selecting multiple wrapper divs in which
we will then try to find search results -- this change is mostly needed
for sites which have so little semantic markup that we need to pass
several divs of which just one have results.
To Source modules everything should "just work"(tm).
PunBB forum is to blame for this feature, so it's new source. 
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 package Grep::Source::PunBB;
7
8 =head1 NAME
9
10 Grep::Source::PunBB - scraiper for PunBB search results
11
12 =cut
13
14 sub content_have {
15 qr(PunBB);
16 }
17
18 sub fetch {
19 my $self = shift;
20 my $parent = shift;
21
22 $parent->scrape(
23 submit_form => {
24 with_fields => {
25 keywords => $parent->q,
26 },
27 },
28 wrapper => [ qw/div class box/ ],
29 results => [ qw/div class tclcon/ ],
30 scrape => [ qw/div id punviewtopic/ ],
31 );
32
33 }
34
35 1;

  ViewVC Help
Powered by ViewVC 1.1.26