Repository navigation
Add google_api_addr and bing_api_addr settings - #425
Open
Specstreamai wants to merge 1 commit into
Open
Specstreamai wants to merge 1 commit into
Specstreamai wants to merge 1 commit into
Conversation
Empty by default, so google_api and bing_api keep the Google and Bing addresses. Same pattern as passivedns_api_addr.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
google_apiandbing_apisend their requests to fixed addresses, and config/api.py only holds the key and ID for each. Google's overview page says "Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution" (https://developers.google.com/custom-search/v1/overview), and Microsoft's notice says "Bing Search APIs will be retired on August 11, 2025. Any existing instances of Bing Search APIs will be decommissioned completely" (https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement). Sobing_apican't return anything now andgoogle_apistops in January, with nothing in the config to change.This adds
google_api_addrandbing_api_addrto config/api.py and config/default.py, empty by default, the same waypassivedns_api_addrworks. When they're empty the two modules use the Google and Bing addresses as before. Someone with a service that answers in the same format can set the address and keep using the module.Tested: both flake8 commands from test.yml pass (the E265 they report on config/api.py is the existing
#https://www.racent.comline). The repo has no unit tests (the pytest step in test.yml is commented out), so I ran a script against a local HTTP server: with the settings empty both modules keep the original addresses, and with them set,GoogleAPI.searchandBingAPI.searchsend their requests to the local server and pick up the subdomains from its answers. I didn't run test.py, because it scans a live domain.I run a search API that answers in the Custom Search JSON format, which is how I ran into the date.