8000 Add google_api_addr and bing_api_addr settings by Specstreamai · Pull Request #425 · shmilylty/OneForAll · GitHub
[go: up one dir, main page]

Skip to content

Add google_api_addr and bing_api_addr settings - #425

Open
Specstreamai wants to merge 1 commit into
shmilylty:masterfrom
Specstreamai:search-api-addr
Open

Specstreamai wants to merge 1 commit into
shmilylty:masterfrom
Specstreamai:search-api-addr

Conversation

@Specstreamai
Copy link
Copy Markdown

google_api and bing_api send 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). So bing_api can't return anything now and google_api stops in January, with nothing in the config to change.

This adds google_api_addr and bing_api_addr to config/api.py and config/default.py, empty by default, the same way passivedns_api_addr works. 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.com line). 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.search and BingAPI.search send 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.

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

No deployments
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.

1 participant

0