setRandomizeUserAgent
void session.setRandomizeUserAgent ( boolean randomizeUserAgent ) (professional and enterprise editions only)
Description
Causes the "User-Agent" header sent by screen-scraper to be randomized. The user agent strings from which screen-scraper will select are found in the "resource\conf\user_agents.txt" file.
Parameters
- randomizeUserAgent true or false
Return Values
None
Change Log
Version | Description |
---|---|
5.5.34a | Available in Professional and Enterprise editions. |
Examples
Randomize the user-agent header
session.setRandomizeUserAgent( true );
// You can also access the current value like so:
session.log( "Randomize user agent: " + session.getRandomizeUserAgent() );
// You can also access the current value like so:
session.log( "Randomize user agent: " + session.getRandomizeUserAgent() );
todd on 03/08/2012 at 12:56 pm
- Printer-friendly version
- Login or register to post comments