I'm running the program with multiple parseweb calls (Iowa, Missouri, Kansas, Oklahoma, Texas, Illinois, and Nebraska) from one multistate search call. It returns 1,000 repeaters (which I confirmed by having it print them out). Then, when the parseweb function tries to pull out coordinates, it crashes. I'm including the last repeater that it lists, and showing the trackback below:
Repeater 999 out of 1000: {'Link': 'https://www.repeaterbook.com/repeaters/details.php?state_id=20&ID=3879', 'Frequency': '442.1250', 'Offset/shift': '+5 MHz', 'Tone': 'None', 'Location': 'Louisburg', 'County': 'Miami', 'state/province': 'KS', 'Call': 'K0HAM', 'Use': 'OPEN'}
Beginning Location Collection
Getting Repeater Number 0 of 1000
Traceback (most recent call last):
File "/home/patrickdickey/gitprojects/RepeaterTrek/RepeaterTrek.py", line 422, in
parseFromWeb('IA','https://www.repeaterbook.com/repeaters/msResult.php?state_id%5B%5D=17&state_id%5B%5D=19&state_id%5B%5D=20&state_id%5B%5D=29&state_id%5B%5D=31&state_id%5B%5D=40&state_id%5B%5D=48&band=%25&freq=&loc=&call=&features=%25&emcomm=%25&coverage=%25&status_id=%25&order=%60state_abbrev%60%2C+%60freq%60+ASC',wideArea='https://www.repeaterbook.com/repeaters/msResult.php?state_id%5B%5D=17&state_id%5B%5D=19&state_id%5B%5D=20&state_id%5B%5D=29&state_id%5B%5D=31&state_id%5B%5D=40&state_id%5B%5D=48&band=%25&freq=&loc=&call=&features=%25&emcomm=%25&coverage=wide&status_id=%25&order=%60state_abbrev%60%2C+%60freq%60+ASC')
File "/home/patrickdickey/gitprojects/RepeaterTrek/RepeaterTrek.py", line 130, in parseFromWeb
coords = (soup.split('LatLng')[1].split(';')[0]).strip('()').split(',')
IndexError: list index out of range
Do I need to select a different option in the multi-state search on RepeaterBook in order to get the coordinates, or is this completely unrelated to my issue?
Have a great day. :)
Patrick.
I'm also attaching my version of your file, so you can see if there's another issue (note, I put a for loop in to print out the repeaters that are stored in the array, so I could verify that something was there).
RepeaterTrek.txt