Added a search filter to restrict innapropriate words that may be searched so children will be safe when using whoogle... Can be changed in the future as I have not included all the possible words that could be entered...

pull/1029/head
BlockmasterPlayz 11 months ago
parent 63a2ea56ed
commit 4b7af3f3a1

@ -79,7 +79,15 @@ def clean_query(query: str) -> str:
Returns:
str: The query string without any "-site:..." filters
"""
return query[:query.find('-site:')] if '-site:' in query else query
RestrictedWords = ["porn", "sex", "horny", "nsfw"]
query = query[:query.find('-site:')] if '-site:' in query else query
for word in RestrictedWords:
query = query.replace(word, " ")
return query
def clean_css(css: str, page_url: str) -> str:

Loading…
Cancel
Save