Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
BOFA1ex committed Oct 9, 2021
1 parent 076a7df commit e805092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hq.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def hq():

resp = {}
for index, exp in enumerate(args.xpath):
it = re.findall('(\\w+)=?(/.*)', exp, re.M)[0]
it = re.findall('(\\w+)?=?(/.*)', exp, re.M)[0]
key = '_{}'.format(index) if len(it[0]) == 0 else it[0]
val = it[0] if len(it) == 1 else it[1]
items = [
Expand All @@ -40,7 +40,7 @@ def hq():
]
resp[key] = items[0] if len(items) == 1 else items

sys.stdout.writelines(json.dumps(resp, ensure_ascii=False))
sys.stdout.writelines(json.dumps(resp, ensure_ascii=False) + '\n')
sys.stdout.flush()


Expand Down

0 comments on commit e805092

Please sign in to comment.