Advice on buying junkyard engines?

LKQ sells engines with a six month warranty. There's a 5.9 Magnim right now in Georgia with like 165K for 1600 bucks. Not bad considering it comes with induction and exhaust. You could resell those items to recoup some of the cost.
They're on FB marketplace all day for under a grand. But no warranty