uri = '''https://vmap0.tiles.osgeo.org/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,45,-45,90&WIDTH=256&HEIGHT=256 '''
layer = QgsRasterLayer(uri, "RESA", "WMS")
if layer.isValid():
pass
else:
print('error')
The result is 'error'.This does not meet my expectations of adding an HTTPS type WMS service.I tried querying pyQGIS's API, but found nothing.