diff --git a/src/sherpa_ai/tools.py b/src/sherpa_ai/tools.py index 6297c1e9..c23b09c7 100644 --- a/src/sherpa_ai/tools.py +++ b/src/sherpa_ai/tools.py @@ -126,6 +126,10 @@ def _run( summaries = re.findall(summary_pattern, xml_content, re.DOTALL) title_pattern = r"(.*?)" titles = re.findall(title_pattern, xml_content, re.DOTALL) + + # Note that arXiv may return on extra title for the search feed itself + titles = titles[len(titles) - len(summaries):] # align titles and summaries + id_pattern = r"(.*?)" ids = re.findall(id_pattern, xml_content, re.DOTALL)