Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
a5f2ded9
Commit
a5f2ded9
authored
5 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
remove obsolete web services from ws client module
parent
c326fcf5
No related branches found
No related tags found
1 merge request
!13
Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/ws.py
+0
-79
0 additions, 79 deletions
ippisite/ippidb/ws.py
with
0 additions
and
79 deletions
ippisite/ippidb/ws.py
+
0
−
79
View file @
a5f2ded9
...
...
@@ -77,85 +77,6 @@ def get_pubmed_info(pmid):
}
def
get_epo_info
(
patent_number
):
"""
Retrieve information about a patent using the EPO website
WARNING: this is not to be used anymore, the 3.1 version of the EPO service is now
offline
:param patent_number: patent number
:type patent_number: str
:return: patent metadata (title, journal name, publication year, authors list).
:rtype: dict
"""
resp
=
requests
.
get
(
f
"
http://ops.epo.org/3.1/rest-services/published-data/publication/docdb/
"
f
"
{
patent_number
}
/biblio.json
"
)
data
=
resp
.
json
()
exchange_doc
=
data
[
"
ops:world-patent-data
"
][
"
exchange-documents
"
][
"
exchange-document
"
]
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
"
][
0
]
authors
=
[
i
[
"
inventor-name
"
][
"
name
"
][
"
$
"
]
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
,
"
journal_name
"
:
None
,
"
biblio_year
"
:
biblio_year
,
"
authors_list
"
:
authors
,
}
def
get_google_patent_info_ris
(
patent_number
):
"""
Retrieve information about a patent using the Google RIS web service
WARNING: this is not to be used anymore, this Google Web service is now offline
:param patent_number: patent number
:type patent_number: str
:return: patent metadata (title, journal name, publication year, authors list).
:rtype: dict
"""
url
=
"
https://encrypted.google.com/patents/{}.ris
"
.
format
(
patent_number
)
resp
=
requests
.
get
(
url
)
title
=
None
authors
=
[]
biblio_year
=
None
for
line_str
in
resp
.
text
.
split
(
"
\n
"
):
line
=
line_str
.
strip
().
split
(
"
-
"
)
if
line
[
0
]
==
"
A1
"
:
authors
.
append
(
line
[
1
])
elif
line
[
0
]
==
"
T1
"
:
title
=
line
[
1
]
elif
line
[
0
]
==
"
Y1
"
:
biblio_year
=
line
[
1
].
split
(
"
/
"
)[
0
]
return
{
"
title
"
:
title
,
"
journal_name
"
:
None
,
"
biblio_year
"
:
biblio_year
,
"
authors_list
"
:
authors
,
}
def
get_google_patent_info
(
patent_number
):
"""
Retrieve information about a patent parsing Dublin Core info in the Google HTML
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment