I have the following url encoded in utf-8.
url_input = u'https://www.gumtree.com//p/uk-holiday-rentals/1bedroon-flat-\xa3250pw-all-bills-included-/1174092955'
I need to scrap this webpage and to do so I need to have the following url_output (unicode is not read).
url_output=https://www.gumtree.com//p/uk-holiday-rentals/1bedroon-flat-£250pw-all-bills-included-/1174092955
When I print url_input, I get url_output:
print(url_input)
https://www.gumtree.com//p/uk-holiday-rentals/1bedroon-flat-£250pw-all-bills-included-/1174092955
However I do not find a way to transform url_input to url_output. According to forums the print function uses ascii decoding on Python 2.7 but ascii is not supposed to read \xa3 and url_input.encode('ASCII') does not work.
Does someone know how I can solve this problem ? Thanks in advance !