From 5a05bfb6debfbb82841676d2d16ef5a6c6ffa5ce Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Tue, 26 Oct 2021 12:28:38 -0400 Subject: [PATCH] Allow setting number of results per page (#486) Add `WHOOGLE_RESULTS_PER_PAGE` var, allowing users to specify the number of results per page. The default is 10. --- app/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/request.py b/app/request.py index 9bb9bd0..0c80f9b 100644 --- a/app/request.py +++ b/app/request.py @@ -9,7 +9,8 @@ import os from stem import Signal, SocketError from stem.control import Controller -SEARCH_URL = 'https://www.google.com/search?gbv=1&q=' +SEARCH_URL = 'https://www.google.com/search?gbv=1&num=' + str( + os.getenv('WHOOGLE_RESULTS_PER_PAGE', 10)) + '&q=' MAPS_URL = 'https://maps.google.com/maps' AUTOCOMPLETE_URL = ('https://suggestqueries.google.com/' 'complete/search?client=toolbar&')