Never rub a carpet to soak up liquid that has been spilled. Using as much dry cloth as you need, blot the area until most of the liquid has been absorbed.
If your first treatment fails, let the carpet dry before you try something else. You'll have a better idea how much of the stain remains once the carpet is dry.