In the case of the Basque country EDI, the ZIP archive containing the XSD files is located at https://www.gipuzkoa.eus/documents/2456431/13761107/Esquemas+de+archivos+XSD+de+env%C3%ADo+y+anulaci%C3%B3n+de+factura_1_2.zip/2d116f8e-4d3a-bff0-7b03-df1cbb07ec52 which does not end in .zip due to the hash at the end. The current mechanism for detecting whether the file is an XSD or a ZIP does not handle this, so the ZIP can't be downloaded. Instead of trying to guess the file type from the URL, we therefore try to open the file as a ZIP, and if that fails, we assume it's an XSD. closes odoo/odoo#118933 X-original-commit: 0f1b128a8bcb01ecd5ca8a8db1dfa41230ecadda Signed-off-by: Josse Colpaert <jco@odoo.com>