We compute the Euclidean correlators of the stress tensor in pure $SU(3)$ Yang-Mills theory at finite temperature at zero and finite spatial momenta with lattice simulations. We perform continuum extrapolations using $N_tau=10,12,16,20$ lattices with renormalized anisotropy 2. We use these correlators to estimate the shear viscosity of the gluon plasma in the deconfined phase. For $T=1.5T_c$ we obtain $eta/s=0.17(2)$.