pub async fn fetch_zip(
client: &Client,
input_url: &str,
) -> AppResult<BTreeMap<String, String>>Expand description
Fetches ZIP file links from a single procurement data page.
Downloads the HTML content from the given URL and parses it to extract
all ZIP file download links. Period identifiers are extracted from filenames
using a regex pattern that matches _YYYYMM.zip or similar formats.
§Arguments
client- HTTP client to use for the requestinput_url- URL of the page containing ZIP file links (e.g., the minor contracts or public tenders landing page)
§Returns
A map from period strings (e.g., “202301”) to absolute download URLs.
§Errors
Returns an error if:
- The HTTP request fails
- The URL cannot be parsed
- HTML parsing fails