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τ=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.5Tc we obtain η/s=0.17(2).