Parent Directory | Revision Log
WebGUI search scraper
1 | dpavlin | 93 | #!/usr/bin/perl |
2 | |||
3 | use warnings; | ||
4 | use strict; | ||
5 | |||
6 | package Grep::Source::WebGUI; | ||
7 | |||
8 | =head1 NAME | ||
9 | |||
10 | Grep::Source::WebGUI - scraiper for WebGUI search results | ||
11 | |||
12 | =cut | ||
13 | |||
14 | sub content_have { | ||
15 | qr(generator.*WebGUI); | ||
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 homeText/ ], | ||
29 | results => 'dt', | ||
30 | scrape => [ qw/div class homeText/ ], | ||
31 | ); | ||
32 | |||
33 | } | ||
34 | |||
35 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |