Skip to content
Snippets Groups Projects
Commit e0651f5f authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

parse correctly patent title and authors

Former-commit-id: c23a451c8931242a714ff3fd18081e0ccb110b9b
parent e939a4d1
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,9 @@ def get_epo_info(patent_number):
if isinstance(exchange_doc, list):
exchange_doc = exchange_doc[0]
title = [el['$']
for el in exchange_doc['bibliographic-data']['invention-title'] if el['@lang'] == 'en']
for el in exchange_doc['bibliographic-data']['invention-title'] if el['@lang'] == 'en'][0]
authors = [i['inventor-name']['name']['$']
for i in exchange_doc['bibliographic-data']['parties']['inventors']['inventor'] if i['@data-format'] == 'original']
for i in exchange_doc['bibliographic-data']['parties']['inventors']['inventor'] if i['@data-format'] == 'original'][0]
biblio_year = [el['date']['$'][:4]
for el in exchange_doc['bibliographic-data']['publication-reference']['document-id'] if el['@document-id-type'] == 'epodoc'][0]
return {'title': title,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment