This is just a 1/2” nipple to extend into the tub.
A) this has been leaking for quite some time based on the way the inside looks- I would investigate before installing another nipple.
B) get the right sized nipple, but also you will need to seal around that hole- 1/2” pipe and 1” holes don’t math very well.
C) make sure the new nipple ( or previous reinstalled) is tight enough to not have leaks, I suggest maybe buying a bit of some better Teflon tape or a small amount of pipe dope to help with the process.
Are you sure the pipe extending out of the faucet just isn't stuck on there and can be removed? If so, just take it off and thread it back on to the wall and then you can use any normal faucet from HD. I have one similar to that when I was replacing my shower head and noticed it was getting stuck to the head rather than staying in the wall.
No it's probably corroded, so you need pipe dope, Teflon tape, channell locks, white caulk, just a small squeeze tube, and a half inch galvanized nipple, (brass is preferable but it's more expensive) also when you get the new tub spout make sure it is also threaded, the ones that tighten to copper are fairly popular so make sure you get the threaded kind.
Now the nipple should be the same size as the old one so just bring the spout with you to the store, I would also suggest grabbing a 1/2 inch size longer and a 1/2 inch size shorter, just in case. It also doesn't hurt to show one of the employees what you're looking for if you have the spout with you.
Now when it comes to installing, do about 4 wraps of Teflon around each of the 2 threads, then wipe pipe for over those threads as well. Using the channel locks, tighten it onto the spout as much as you can first, then tighten the spout onto the threads behind the wall. You of course want it to be flush with the wall but if it doesn't make it home all the way but is very close that's okay. Turn it on make sure there's no leaks, Then caulk around it afterward, most caulk you need to wait like 24 hours.
Oh I almost forgot, when tightening the spout to the wall do not use the channell lock for that, if you do you will scratch up the finish. Just use your hands to tighten.