I'd have no problem running them, IF the price is right.
Thing with wrecking yard vehicles is that many of them are in there because the previous owner was an idiot that had a problem with the vehicle, and instead of diagnosing the problem, spent money on new parts, until they ran out of money, still didn't have a running vehicle, and it ends up there. See parts ALL the time on wrecking yard vehicles that still have the part label on them.
If you can install the part quickly (to get use out of the warranty) and again, cost vs. new is worth a shot, go ahead. Just look around for ones that are obviously newly installed. I'd not waste time with an O2 sensor that looked like it was 10 years old, but the one that still has shiny spots on the wrench flats from install? Sure.
Some of those parts though, its a good idea to do some research and find what interchanges...doesn't have to be the same donor necessarily.