download page using python logical replacing pt logical