There is an infinitesimal version of this result giving a 1-cocycle for Vect(S), the Lie algebra of smooth vector fields, and hence for the Witt algebra, the subalgebra of trigonometric polynomial vector fields.