Fix get_url to work on Python 2.4