|
7 | 7 | import logging |
8 | 8 | import re |
9 | 9 | from typing import Any, Optional, Union |
10 | | -from typing_extensions import TypedDict |
11 | 10 |
|
12 | 11 | import requests |
13 | 12 | from idutils import is_doi |
| 13 | +from typing_extensions import TypedDict |
14 | 14 |
|
15 | 15 | logger = logging.getLogger(__name__) |
16 | 16 |
|
@@ -118,7 +118,7 @@ def __init__(self, metadata: dict[str, str]) -> None: |
118 | 118 | self.published_date = datetime.datetime.strptime(published_date, "%Y-%m-%d") if published_date else None |
119 | 119 |
|
120 | 120 | def generate_author_list(self, metadata: dict[str, str]) -> list[PublicationAuthors]: |
121 | | - authors = [s.strip() for s in metadata.get("preprint_authors", "").split(";")] |
| 121 | + authors = [s.strip() for s in metadata.get("authors", "").split(";")] |
122 | 122 | return [{"name": author, "primary": idx == 0} for idx, author in enumerate(authors)] |
123 | 123 |
|
124 | 124 |
|
@@ -201,10 +201,10 @@ def __init__(self, metadata: dict[str, str]) -> None: |
201 | 201 | not be the case for certain publications. |
202 | 202 | """ |
203 | 203 | super().__init__(metadata) |
204 | | - self.author_corresponding = metadata.get("preprint_author_corresponding") |
205 | | - self.author_corresponding_institution = metadata.get("preprint_author_corresponding_institution") |
206 | | - self.platform = metadata.get("preprint_platform") |
207 | | - self.abstract = metadata.get("preprint_abstract") |
| 204 | + self.author_corresponding = metadata.get("author_corresponding") |
| 205 | + self.author_corresponding_institution = metadata.get("author_corresponding_institution") |
| 206 | + self.platform = metadata.get("platform") |
| 207 | + self.abstract = metadata.get("abstract") |
208 | 208 | self.published_journal = metadata.get("published_journal") |
209 | 209 |
|
210 | 210 | self.authors = self.generate_author_list(metadata) |
|
0 commit comments