🔍 Overview
The GoogleSafeBrowsing class provides an interface to Google’s Safe Browsing API (v4) for checking domains/URLs against known threat lists.
It is used to monitor:
📑 Class Attributes
| Attribute | Type | Description |
|---|---|---|
URL | str | Endpoint URL constructed from settings.GOOGLE_SAFEBROWSING_BASE_URL |
API_KEY | str | API key loaded from settings.GOOGLE_SAFEBROWSING_API_KEY |
🧩 Methods
| Method | Description |
|---|---|
_build_payload(links) | Constructs the API request payload from a list of links. |
_send_request(links) | Sends the request to the Google Safe Browsing API and returns the response. |
check_links(links) | Public method to check a list of links/domains against the Google Safe Browsing API. |
📍 Where Using
- Block links tasks
- Unblock links tasks
- Offer links monitoring tasks
- Tracking domains monitoring tasks
- Backup domain checks before sending appeals (see Send Appeals Tasks)