Convert download process to Python