This would be clearer using the `requests` library, which we already install as a prereq