TT #176 · Parashas Shoftim · Fourth Aliyah · Passuk 18:11
Or a charmer of charms, or one who inquires of a ghost or a familiar spirit, or one who seeks the dead.
Torah Temimah points to Sanhedrin 65b.
TT lemma: וְדֹרֵשׁ אֶל הַמֵּתִים.
English: ‘And one who seeks the dead’ – this is one who fasts and lodges in the cemetery.
Derash defining necromancy (Bavli) — the practice is described as fasting and sleeping among the graves.
Seeking information from the dead by lodging in cemeteries after fasting is forbidden.