Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- resp = json.loads(r.text)['hits']['hits']
- out = []
- for r in resp:
- x = r['_source']
- start = strptime(x['dt_start'], '%Y-%m-%dT%H:%M:%S')
- end = strptime(x['dt_end'], '%Y-%m-%dT%H:%M:%S')
- if start > dt_start and end < dt_end:
- out.append(x)
- return out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement