You can not get pregnant from petting a dog that may or may not have had the misfortune of lying in a bed covered with your brother’s ejaculate*.
You also can not get pregnant petting a cat that may have been covered in semen… or a gerbil… or a fish.
Even if you go to the bathroom and wipe yourself afterward while you’re still covered in fish scales.
Even if by “pet” you mean that the animal in question curled up between your legs while you were lying there naked and you rubbed yourself all over it.
That was not your mother’s LOLcat
Explanation for why you can’t get pregnant by petting your pussy
Sperm has to be alive to get you pregnant. Furthermore, it has to get inside your vagina, up through your cervix, and have a party with an egg.
If a dog or cat was soaked in enough semen to get your hand wet, you’d still have to shove it up inside your body and get really unlucky – you’re not going to get pregnant just by sperm touching your skin
That having been said, I can only hope that if your pet was covered with a strange slimy substance when you were petting it, you’d wash your hands before sticking your fingers inside your vagina. God knows I would. Semen would be the least of my worries.
*Yes. Someone asked. You can see the comment here