#๐Ÿ”’ Need Help Parsing NASA html

27 messages ยท Page 1 of 1 (latest)

languid plover
#

I am attempting to parse through the Mars weather report on NASA's website but whenever I use requests to get the html the information I'm looking for is no longer present. I've attached screenshots of what I see when inspecting, and what I see in the request I made. Any help would be appreciated thanks.

atomic shoreBOT
#

@languid plover

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

dry mulch
#

i'm pretty sure nasa has a lt of APIs for a lot of stuff

wispy forge
#

They do

languid plover
#

I've tried looking online and every API is from Insight or another rover which are all offline or outdated

wispy forge
midnight wren
#

hah jinx

dry mulch
#

hah jinx

midnight wren
#

Yeah it's stupid easy to get API access for NASA

wispy forge
#

Jinx

languid plover
#

the weather API linked on the website has been outdated for a few years

#

yeah, all data from insight stopped updating in 2020, I tried looking for an API that records Curiosity's data but I couldn't find one, which is why I attempted to parse through the html on the website

deep tide
#

just out of curiosity what's the url that has different content in the browser vs requests?

languid plover
#

I'm just not capturing what's in between the <span class="marsDate"> and </span>

deep tide
#

it looks like they use an api call to load the data

languid plover
#

oh neat, how'd you find that?

deep tide
#

the network tab in the chrome dev tools

#

i filtered to fetch/xhr

languid plover
#

wow, thank you!

atomic shoreBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Need Help Parsing NASA html