Switch host extraction to Python script.