Skip to content

Apply safesearch to Bing image payloads#471

Open
tine1117 wants to merge 1 commit into
deedy5:mainfrom
tine1117:fix-bing-images-safesearch
Open

Apply safesearch to Bing image payloads#471
tine1117 wants to merge 1 commit into
deedy5:mainfrom
tine1117:fix-bing-images-safesearch

Conversation

@tine1117

Copy link
Copy Markdown

Summary

Bing image search accepted the safesearch argument but did not include it in the request payload. This maps the existing on, moderate, and off values to Bing's adlt parameter so image searches respect the caller's setting.

I also added a small payload-level test so this stays covered without making a live search request.

Fixes #468.

Test

python -m pytest tests/bing_images_test.py -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BingImages backend ignores safesearch for image search

1 participant