Python: Extracting a URL in Python