Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Addition of '&filter=0' in search query

I have added '&filter=0' to the query to force all results with large offsets (specially after 500 or so results).
  • Loading branch information...
commit ab7170627ec494f555ac9dc5d40b811e13a41ac8 1 parent 26e195b
Lucas Vall lucasvall authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  google_scraper.js
3  google_scraper.js
View
@@ -37,6 +37,7 @@ var SeerJs_GoogleScraper = (function() {
* @param {array} optResults (Optional) Number of results to return (defaults to 10)
* @param {string} optTld (Optional) Top level domain (eg: ".co.uk". Defaults to ".com")
* @param {string} optStart (Optional) Sets the starting offset for results (defaults to 0)
+ * filter=0 Force all results from Google. Important when using large offset
*/
function fetch(kw, optResults, optTld, optStart) {
errorOccurred = false;
@@ -44,7 +45,7 @@ var SeerJs_GoogleScraper = (function() {
optStart = optStart || 0;
optTld = optTld || '.com';
try {
- var url = 'http://www.google' + optTld + '/search?q=' + kw + '&start=' + optStart + '&num=' + optResults;
+ var url = 'http://www.google' + optTld + '/search?q=' + kw + '&start=' + optStart + '&num=' + optResults + '&filter=0';
return UrlFetchApp.fetch(url).getContentText()
} catch(e) {
errorOccurred = true;
Please sign in to comment.
Something went wrong with that request. Please try again.