setUseProxyFromPool
void session.setUseProxyFromPool ( boolean useProxyFromPool )
Description
Determine if proxies from a proxyServerPool be used when making scrapeable file request.
Parameters
- useProxyFromPool Whether proxies in the proxyServerPool should be used, as a boolean.
Return Values
Returns void.
Change Log
Version |
Description |
4.5 |
Available for all editions. |
Examples
Anonymize Scrapeable Files
// Create a new ProxyServerPool object. This object will
// control how screen-scraper interacts with proxy servers.
proxyServerPool = new ProxyServerPool();
// We give the current scraping session a reference to
// the proxy pool. This step should ideally be done right
// after the object is created (as in the previous step).
session.setProxyServerPool( proxyServerPool );
... Proxy Server Pool Setup ...
// This is the switch that tells the scraping session to make
// use of the proxy servers. Note that this can be turned on
// and off during the course of the scrape. You may want to
// anonymize some pages, but not others.
session.setUseProxyFromPool( true );
See Also
- getUseProxyFromPool() [session] - Returns whether or not a proxy from the proxy pool will be used upon making a request