I am trying to get the list of feature service which has a specific layer (for example: River (the layer id is 0)) from a feature service,
from arcgis.gis import GIS
gis = GIS(url='https://pythonapi.playground.esri.com/portal', username='arcgis_python', password='amazing_arcgis_123')
search_result = gis.content.search(query="River", item_type="Feature Layer")
for layer in search_result:
if "River" in layer.title.lower():
print(f"Layer name: {layer.title}, \tOwner: {layer.owner}, \tLayer ID: {layer.id}")
But no results are printed out, but the layer River is present in most of my feature service. What can be done in this case ??
if "River" in layer.title
part of the code and just print the output of the loop, can you confirm your code finds anything at all?layer.title.lower()
--- "River" (capital R) will NEVER be found inriver more river, this is my lowercase river