Skip to content

Commit

Permalink
Fix windows parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Jan 5, 2023
1 parent 6448ab8 commit 51ead5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astroquery/solarsystem/pds/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51ead5f

Please sign in to comment.