| 1 | package WWW::FreeProxy::PublicProxyServers; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use LWP::Simple; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | =head1 FUNCTIONS | ||||||||||
| 6 | |||||||||||
| 7 | =head2 fetch | ||||||||||
| 8 | |||||||||||
| 9 | Fetches proxy list | ||||||||||
| 10 | |||||||||||
| 11 | =cut | ||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub fetch { | ||||||||
|
Subroutine
fetch: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 14 | 0 | my ($self, $callback) = @_; | |||||||||
| 15 | 0 | for (1..6) { | |||||||||
| 16 | 0 | ▶ | my $content = get("http://www.publicproxyservers.com/page$_.html") or return []; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | ▶ | &$callback("$1:$2") while $content =~ m~<td[^>]*?>(\d+\.\d+\.\d+\.\d+)</td>.*?<td[^>]*?>(\d+)</td>~igs; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 1 | 1; | |||||||||
| 22 | |||||||||||
| 23 | =head1 COPYRIGHT & LICENSE | ||||||||||
| 24 | |||||||||||
| 25 | Copyright 2008 Alexey Alexandrov, all rights reserved. | ||||||||||
| 26 | |||||||||||
| 27 | This program is free software; you can redistribute it and/or modify it | ||||||||||
| 28 | under the same terms as Perl itself. | ||||||||||
| 29 | |||||||||||
| 30 | =cut | ||||||||||