Working temperature extraction in Python