Setting up a wifi enabled Arduino to scrape a website at intervals

I need my Arduino to wake up at intervals and connect to a consistent wifi network and then get data from a website before falling asleep again. Specifically, it will be scraping temperature data from a website running a motor based on that data and then going back to sleep. I just ordered the Espressif ESP8266 wifi module and I already have arduino unos and nanos but preferably I'd like this solution to work with pretty much any microcontroller. I need to figure out how to get the module to connect to a wifi network using a phone. I also need to figure out how the board will remember that network while it is sleeping so that it can quickly connect to it when it wakes up. The user should only have to connect it to the network once on setup and then it should work without any intervention from then on. I also need the wifi module transmitting and receiving for the least possible amount of time because power management is a big problem for this project. I'm assuming the process would be: arduino connects to wifi, arduino connects to a server, arduino transmits IP address/location data to the server, server runs code that scrapes a website for this data, server returns temperature data for that location, arduino receives temperature data, wifi module turns off, arduino adjusts a motor based on this temperature data. If any of that seems wrong or unnecessary please let me know. I have pretty much no experience with problems like this so a comprehensive explanation would be very appreciated.
I'm assuming I will need to set up some sort of API.
If I can do this entirely within the Arduino without running external code, interfacing with an API, or connecting to some random server, this is preferable.
Of course if the best and most practical solution is using a private webserver and PHP script for scraping this works too.

russellbar:
I need to figure out how to get the module to connect to a wifi network using a phone.

That part is unclear. What you want? You do not need a phone to connect to a network. You could use a phone to configure your device by providing a private network with a web page where the user writes in some data e.g. WiFi SSID and password.

russellbar:
I also need to figure out how the board will remember that network while it is sleeping so that it can quickly connect to it when it wakes up.

That can be done. However quickly is not a term used for WiFi networks.

russellbar:
The user should only have to connect it to the network once on setup and then it should work without any intervention from then on.

That part is up to you.

russellbar:
I also need the wifi module transmitting and receiving for the least possible amount of time because power management is a big problem for this project. ... arduino adjusts a motor based on this temperature data. If any of that seems wrong or unnecessary please let me know.

You have power for a motor and worry about the power for WiFi?

russellbar:
I have pretty much no experience with problems like this so a comprehensive explanation would be very appreciated.

The ESP8266 board support comes with a wide range of examples that will help you get started and get some experience.

for the first phase of development and to get used to the ESP8266, I recommend to use a NodeMCU or Wemos D1- it will make the first uploads a lot easier. Later on, when your sketch is stable and you want to use power save/deepsleep - you can use the plain ESP8266 - 12E.

waking up from deepsleep, (re-)connect to wifi if necessary, fetch some data, do some things could last some few seconds - if this is a problem for your total power consumption balance sheet, I wonder what you are doing with a motor. I assume your device for the internet connection will need more power as it will be 24h on.

PS.: the ESP has several options how to persist wlan data - so this is not really an issue.