updated python scanner to match the updates from the golang version