Update 'xppl/getannot.py'

This commit is contained in:
anglk 2019-01-30 21:18:44 +01:00
parent 80845b4429
commit 59be37d9a4

View File

@ -45,7 +45,7 @@ def get_annot_results(annot, name):
data = {
'text': item['text'],
'extract': item['target'][0]['selector'][2]['exact'],
'title': item['uri'][36:], 'url': item['uri']
'title': item['uri'][37:], 'url': item['uri']
}
res.append(data)
else:
@ -54,7 +54,7 @@ def get_annot_results(annot, name):
data = {
'text': item['text'],
'extract': item['target'][0]['selector'][1]['exact'],
'title': item['uri'][36:], 'url': item['uri']
'title': item['uri'][37:], 'url': item['uri']
}
res.append(data)
return res
@ -71,7 +71,7 @@ def get_annot_book(annot, name):
data = {
'text': item['text'],
'extract': item['target'][0]['selector'][2]['exact'],
'title': item['uri'][36:], 'url': item['uri']
'title': item['uri'][37:], 'url': item['uri']
}
res.append(data)
else:
@ -80,7 +80,7 @@ def get_annot_book(annot, name):
data = {
'text': item['text'],
'extract': item['target'][0]['selector'][1]['exact'],
'title': item['uri'][36:], 'url': item['uri']
'title': item['uri'][37:], 'url': item['uri']
}
res.append(data)
return res