The $1$d nonlinear Schr\"odinger equation with a weighted $L^1$ potential