Hydrogen peroxide. Dump it straight on the carpet and blot with clean towels (rags). Do it again after the spot is dry if you need to.
It looks lighter after a day or so (but not lighter than the carpet itself- i use the stuff on beige carpet and there are no traces).
I use it ever few weeks for my spilled earl grey

:
My mom used this trick after we got merconium and blood on the white carpet and it sat for 5 days. You can't even tell there was a stain.
If that fails Spot Shot although toxic is handy. I think my mom may have used both.
Good luck!