I have a feature class that has 700+ records in the attribute table. Each record links to a specific url location. I can get python to extra the unique url (hyperlink). How do I get python to go to the url?
Also, how do I get the record / row to highlight in the attribute table + zoom to that record (zoom to selected).
Can you clarify what you mean by "go to the url" ? Are you trying to get the text from page or do you want to load the url in a web browser?
For the second part, you can use Select Layer By Attribute—Help | ArcGIS for Desktop and then use zoomToSelectedFeatures. Below is a sample for ArcMap:
mxd = arcpy.mapping.MapDocument('/path/to/mxd') df = arcpy.mapping.ListDataFrames(mxd, "Layers")  lyr = arcpy.mapping.ListLayers(mxd, "Target_Layer", df) arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", ' "id" = 1234 ') df.zoomToSelectedFeatures()
Hope this helps,
Hi Earl. Thx for the Select info. Much appreciated.
I would like the python script to open the url. The url links to a specific location - example: https://marinecadastre.gov/espis/#/search/study/322
How do I get the script to automatically open this url?
I was able to open the below hyperlink / url in a web browser. The web browser takes a few seconds to open up, but it does open and goes to the right url (study # 397) . Note: urllink value was captured using row.getValue(urlfield)
# OPENS A HYPERLINK
webbrowser.open(urllink) # https://marinecadastre.gov/espis/#/search/study/397