Skip to content

Commit

Permalink
Use identifier keyword (#19)
Browse files Browse the repository at this point in the history
Use identifier keyword
  • Loading branch information
yymao committed Dec 19, 2019
2 parents 9d9ac76 + 696af16 commit db8ff86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adstex.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
except ImportError:
from urllib import unquote

__version__ = "0.3.5"
__version__ = "0.3.6"

_this_year = date.today().year % 100
_this_cent = date.today().year // 100
Expand Down Expand Up @@ -159,7 +159,7 @@ def id2bibcode(id_this, possible_id_types=("bibcode", "doi", "arxiv")):
for id_type in possible_id_types:
m = _re_id[id_type].search(id_this)
if m:
s = fixedAdsSearchQuery(q=":".join((id_type, m.group())), fl=["bibcode"])
s = fixedAdsSearchQuery(q="identifier:{}".format(m.group()), fl=["bibcode"])
try:
return next(s).bibcode
except StopIteration:
Expand Down

0 comments on commit db8ff86

Please sign in to comment.