From 51ead5f11b9fce9d68c5b5df5e1821662f5ad7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 4 Jan 2023 20:24:00 -0800 Subject: [PATCH] Fix windows parsing --- astroquery/solarsystem/pds/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/astroquery/solarsystem/pds/core.py b/astroquery/solarsystem/pds/core.py index ecf2ac5309..c4e5028c85 100644 --- a/astroquery/solarsystem/pds/core.py +++ b/astroquery/solarsystem/pds/core.py @@ -256,11 +256,12 @@ def _parse_result(self, response, verbose=None): ringtable : `~astropy.table.QTable` """ - soup = BeautifulSoup(response.text, "html.parser") + soup = BeautifulSoup(response.text, "html5lib") text = soup.get_text() # need regex because some blank lines have spacebar and some do not - textgroups = re.split(2*os.linesep+"|"+os.linesep+" "+os.linesep, text) + textgroups = re.split("\n\n|\n \n", text.strip()) ringtable = None + for group in textgroups: group = group.strip() @@ -383,7 +384,6 @@ def _parse_result(self, response, verbose=None): else: ringtable.add_row([ring, min_angle*u.deg, max_angle*u.deg]) - # do some cleanup from the parsing job # and make system-wide parameters metadata of bodytable and ringtable systemtable["epoch"] = Time(epoch, format="iso", scale="utc") # add obs time to systemtable