Hi,Welcome to Just Answer, My name isXXXXX will be helping you with your appliance issue today.
Okay you say this starts and runs and then shuts off about halfway through the cycle and after a few but you can start it again? It won't start right away though will it? The problem is you motor, the motor has overload on it and when the motor overheats the overload will shut the motor down, it will not restart for several minutes until the motor cools enough for the overload to reset, if you listen very carefully you will hear a click after a couple of minutes that is the overload resetting and the dryer will restart, this is a very common problem we see it all time you will need to replace your motor unfortunately, you can see the overload in this picture it has a blue wire connected to it,unfortunately even if you could get an overload for it this would not help, the motor itself needs to be replaced. you can order this @ this link. http://www.repairclinic.com/PartDetail/Drive-Motor/1028915?modelNumber=PYE4500AYW thanks and well wishes, Bryan