On deity, you should get as many spies as possible, as soon as possible, though its not quite worth focusing your tech path over. Increase your temporary spy level whenever you can, your priority at first is to level up your spies. Siphon funds to start. Get the siphon funds or rocketry promotions whenever possible. Middle game, you need your spies to by bouncing from city to city to disrupt rocketry. In some games, your victory will come early enough that you don't really need to, but I've had a turn 264 science loss before due to not prioritizing spying and scouting. If need be, you must trade for open borders and send scouts to the middle of land areas in order to reveal spaceport cities. If managed properly it becomes almost impossible to lose to science. I've had two very long games recently in which I was crippled by losing cities early, one was a turn 495 culture win the other a turn 500 score loss, without spies constantly sabotaging spaceports there's no way you can get that far.