fixed returning 0 systems in dense areas by specifying weight on edsm api call
This commit is contained in:
parent
479854809d
commit
dbe371f024
|
|
@ -8,16 +8,17 @@ import sys
|
|||
#IMPORTANT BITS
|
||||
|
||||
###This is the name of the sector you want to search into (Do not use caps!)
|
||||
sectorName = "Phoi Auwsy"
|
||||
sectorName = "Stuemeae"
|
||||
|
||||
|
||||
### "weights" to query, beware of big results when searching for lighter systems in more dense area
|
||||
weightsToQuery = ["f","g","h"]
|
||||
#weightsToQuery = ["f","g","h"]
|
||||
weightsToQuery = ["d"]
|
||||
|
||||
|
||||
### postFix List, modify as needed
|
||||
postFixList =["AA-A","BA-A","CL-Y","DL-Y","EG-Y","FG-Y","YE-A","ZE-A"]
|
||||
#postFixList =["WP-X"]
|
||||
#postFixList =["AA-A","BA-A","CL-Y","DL-Y","EG-Y","FG-Y","YE-A","ZE-A"]
|
||||
postFixList =["FG-Y"]
|
||||
|
||||
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ def fetchEdsmSystems(sectorName, postFix, weight):
|
|||
hasMultipleHyphens = False
|
||||
systemList = []
|
||||
pattern = re.compile(f".*{postFix} {weight}.*")
|
||||
for system in json.loads(apiCall(sectorName +" "+postFix).content):
|
||||
for system in json.loads(apiCall(sectorName +" "+postFix+" "+weight).content):
|
||||
if pattern.match(system['name']):
|
||||
systemList.append(system['name'])
|
||||
hasMultipleHyphens = system['name'].count("-") > 1 # if at least one of those has multiple hyphens, we consider all of them do
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user