Here’s a couple I found:
Combine 3/4 cup baking soda, 2 tbsp corn starch, and 1/4 cup perfumed talcum powder. Sprinkle on dry carpet, let stand 5 to 15 minutes, then vacuum.
This one is wet:
Carpet Cleaning Foam
Mix together: ¼ c. vegetable oil-based liquid soap
3 tbsp. (or more) water
Whip ingredients in bowl with egg beater. Rub foam into problem areas of the rug. Rinse well with water.