Skip to content

Commit 51ead5f

Browse files
committed
Fix windows parsing
1 parent 6448ab8 commit 51ead5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

astroquery/solarsystem/pds/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,12 @@ def _parse_result(self, response, verbose=None):
256256
ringtable : `~astropy.table.QTable`
257257
"""
258258

259-
soup = BeautifulSoup(response.text, "html.parser")
259+
soup = BeautifulSoup(response.text, "html5lib")
260260
text = soup.get_text()
261261
# need regex because some blank lines have spacebar and some do not
262-
textgroups = re.split(2*os.linesep+"|"+os.linesep+" "+os.linesep, text)
262+
textgroups = re.split("\n\n|\n \n", text.strip())
263263
ringtable = None
264+
264265
for group in textgroups:
265266
group = group.strip()
266267

@@ -383,7 +384,6 @@ def _parse_result(self, response, verbose=None):
383384
else:
384385
ringtable.add_row([ring, min_angle*u.deg, max_angle*u.deg])
385386

386-
387387
# do some cleanup from the parsing job
388388
# and make system-wide parameters metadata of bodytable and ringtable
389389
systemtable["epoch"] = Time(epoch, format="iso", scale="utc") # add obs time to systemtable

0 commit comments

Comments
 (0)