NAME

App::ProxyHunter::SearchEngine - base class for proxyhunter's search engine

SYNOPSIS

package App::ProxyHunter::SearchEngine::MyEngine;

use Mo;
extends 'App::ProxyHunter::SearchEngine';

sub next {
	my $self = shift;
	...
	return unless $has_more;
	return $self->_get_proxylist($url);
}

SUBCLASSING

You should inherit this class to implement specific search engine. This subclass may be adapter for some search engine like yahoo.com or for some specific site with proxy list.

METHODS

$self->next()

This method should be implemented in subclass and return reference to array with portion of proxies in host:port format or undef if there is no more proxies.

$self->_get_proxylist($url)

This method implemented in base class and may be used in subclass to extract proxy list from specified $url. It returns reference to array with found proxies. It uses some simple regular expression for search and may not find any proxy for some tricky web sites.

ATTRIBUTES

$self->ua

This attribute contains LWP::UserAgent instance which may be used for http requests

$self->query

This attribute contains urlencoded query which should be used in subclass to search for proxy list. You can ignore it if this is adapter for some specific site with proxy list where you don't need query.