Update main.py
Browse files
main.py
CHANGED
@@ -14,8 +14,8 @@ async def title2doi(title:str):
|
|
14 |
|
15 |
result = cr.works(query = title)
|
16 |
for i, item in enumerate(result['message']['items']):
|
17 |
-
if
|
18 |
-
doi = result['message']['items'][i
|
19 |
break
|
20 |
|
21 |
url = BASE_URL + doi
|
|
|
14 |
|
15 |
result = cr.works(query = title)
|
16 |
for i, item in enumerate(result['message']['items']):
|
17 |
+
if item['title'][0] == title:
|
18 |
+
doi = result['message']['items'][i]['DOI']
|
19 |
break
|
20 |
|
21 |
url = BASE_URL + doi
|