Laser cooling of molecular internal degrees of freedom by a series of shaped pulses