Cranks over start than dies

The car will start sometimes and will be just fine, other times it will start for just second than die, and I can start it and it will die a few times than it will not start at all if you keep trying to start it it will eventually start again if you turn it off sometimes it will start just fine again other times it will start than die again I can start and it will die another few times until it will not start and it will just turn over and eventually start again after trying for awhile again there is no check engine light, new spark plugs new spark plug wires new fuel pump please help

My c

– Cranks over start than dies