googlesearch icon indicating copy to clipboard operation
googlesearch copied to clipboard

Add Safe Search

Open VincentX0905 opened this issue 1 year ago • 2 comments

If you want to turn off the safe search function (this function is on by default), you can do this:

from googlesearch import search
search("Google", safe=None) #turn off safe search

If you don't give a safe value, the default is on:

from googlesearch import search
search("Google") #turn on safe search

VincentX0905 avatar Feb 25 '24 11:02 VincentX0905

before merging You can run pip install -U git+https://github.com/VincentX0905/googlesearch.git to install the package with safe search option.

VincentX0905 avatar Feb 25 '24 11:02 VincentX0905

If you include &safe="active" in the URL SafeSearch mode will be turned on

If &safe=off is included in the URL or not specified SafeSearch mode will be turned off

Google is committed to creating a safe browsing environment For this reason, I set this feature to be on by default.

VincentX0905 avatar Feb 26 '24 06:02 VincentX0905