Community recovery in non-binary and temporal stochastic block models