Partial rewrite with lxml and requests