setUserAgent
| scrapeableFile.setUserAgent( String userAgent ) (professional and enterprise editions only) |
| Description |
| In certain rare cases it may be desirable to explicitly set the "User-Agent" header screen-scraper will send for a given HTTP request. That is, screen-scraper will identify itself as if it were a specific web browser. If unspecified, the user agent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" will be used. Note that this method must be invoked before the file is scraped. |
 |
| Example |
// Causes screen-scraper to identify itself as Firefox // running on Linux. scrapeableFile.setUserAgent( "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826" ); |
|
|
Recent comments
12 hours 4 min ago
12 hours 11 min ago
14 hours 17 min ago
1 day 9 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 11 hours ago
3 days 7 hours ago