From 5a98322dae9ad77ddef7f7ae4cf25def5bf34248 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Fri, 30 Aug 2024 10:38:57 +0200 Subject: [PATCH] hindawi: updates property key for volume year Signed-off-by: pamfilos --- dags/hindawi/parser.py | 2 +- tests/units/hindawi/test_hindawi_parser.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dags/hindawi/parser.py b/dags/hindawi/parser.py index ccd29bfb..a3b706f7 100644 --- a/dags/hindawi/parser.py +++ b/dags/hindawi/parser.py @@ -216,7 +216,7 @@ def _get_publication_info(self, article): "journal_volume": journal.find( "./ns0:subfield/[@code='v']", self.prefixes ).text, - "journal_year": journal.find( + "year": journal.find( "./ns0:subfield/[@code='y']", self.prefixes ).text, } diff --git a/tests/units/hindawi/test_hindawi_parser.py b/tests/units/hindawi/test_hindawi_parser.py index 8fa26ea4..09baf913 100644 --- a/tests/units/hindawi/test_hindawi_parser.py +++ b/tests/units/hindawi/test_hindawi_parser.py @@ -165,21 +165,21 @@ def parsed_articles(hindawi_parser, articles): { "journal_title": "Advances in High Energy Physics", "journal_volume": "2019", - "journal_year": "2019", + "year": "2019", } ], [ { "journal_title": "Advances in High Energy Physics", "journal_volume": "2022", - "journal_year": "2022", + "year": "2022", } ], [ { "journal_title": "Advances in High Energy Physics", "journal_volume": "2022", - "journal_year": "2022", + "year": "2022", } ], ],