Major reworking, including a very nasty xpath that was causing a CPU overflow. I’ve also included the output, so the script does not need to be run to get the csv.