hydrogen peroxide, spray, let sit five minutes blot up with clean cloth
I mix a cup of oxygenated cleaner like Awesome Orange (you can buy it at Dollar Tree) with a bucket water. Apply to carpet with a t-shirt. Rub it in and then let dry.
It really works so well I use this mixture in my carpet cleaner instead of the Bissell commercial brand!
This is my favorite carpet cleaner: https://amzn.to/2CZIeYI