We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39dc181 commit 0d7d637Copy full SHA for 0d7d637
tools/msu_finder.rb
@@ -418,8 +418,15 @@ def find_msb_numbers(keyword)
418
msb_numbers << msb.downcase
419
end
420
421
+
422
next_starting_index = get_next_index(results)
- break if next_starting_index == 0
423
+ next_page = results['queries']['nextPage']
424
425
+ # Google API Documentation:
426
+ # https://developers.google.com/custom-search/json-api/v1/using_rest
427
+ # "This role is not present if the current results are the last page.
428
+ # Note: This API returns up to the first 100 results only."
429
+ break if next_page.nil? || next_starting_index > 100
430
431
rescue RuntimeError => e
432
print_error(e.message)
0 commit comments