CatchZeng/bing_images

Only getting non-explicit search results

codeblech opened this issue · 3 comments

By default, the module seems to only respond with non-explicit search results (SafeSearch: moderate).
Is there a way to change this to SafeSearch: off ?

SafeSearch is a setting item of bing.com, which does not belong to the scope of bing_images module.

See more at https://support.microsoft.com/en-us/topic/turn-bing-safesearch-on-or-off-446ebfb8-becf-f035-9eea-b660e8420458

You can upgrade bing_image to 0.2.2 and try extra_query_params.

from bing_images import bing

urls = bing.fetch_image_urls("cat", 
limit=10, 
file_type='png',
filters='+filterui:aspect-square+filterui:color2-bw', 
extra_query_params='&adlt=off')
print("{} images.".format(len(urls)))
counter = 1
for url in urls:
    print("{}: {}".format(counter, url))
    counter += 1