The most effective ingredient that you can use for this purpose is Baking soda as it not only absorbs moisture but also fight molds and reduces the smell coming from wet rugs.
Make sure you have enough amount of soda at home that covers the entire carpet.