You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
608 B

import httplib, urllib, base64
params = urllib.urlencode({
# Request parameters
'query': 'papers by jaime teevan after 2012',
'complete': '0',
'count': '10',
'offset': '0',
'timeout': '1000',
'model': 'latest',
'subscription-key': 'f7cc29509a8443c5b3a5e56b0e38b5a6',
})
try:
conn = httplib.HTTPSConnection('oxfordhk.azure-api.net')
conn.request("GET", "/academic/v1.0/interpret?%s" % params)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))