safeSearch
Parameters:
status(bool): Indicates whether to enable (True) or disable (False) safe search. Default isFalse.
Description:
The method sends a GET request to Bing to save the safe search setting state.
Depending on the value of status, the method will either enable or disable safe search.
Example Usage:
from searchx import Client
client = Client()
settings = client.settings
# Disable safe search
result = settings.safeSearch(status=False)
print(result) # Output: {'safeSearchStatus': False}
# Enable safe search
result = settings.safeSearch(status=True)
print(result) # Output: {'safeSearchStatus': True}How the Method Works:
The method makes a request to Google to retrieve current cookies.
Based on the status parameter, it sends a request to change the safe search settings.
It returns a dictionary with the current safe search status.
Return Value:
The method returns a dictionary containing the key "safeSearchStatus" with the current setting state.
Last updated