Reputation: 15
I want to scrape from the web some information like price etc. and then I want to put it into table, but my output is:
['789\xa0€']
['Na sklade > 5\xa0ks']
on the website, it is:
<span>789 €</span>
<span>5 ks</span>
I want to get rid of that   (or \n) but how?
Upvotes: 1
Views: 88
Reputation: 17368
In [46]: import unicodedata
In [47]: a = ['789\xa0€','Na sklade > 5\xa0ks']
In [48]: unicodedata.normalize("NFKD", a[1])
Out[48]: 'Na sklade > 5 ks'
In [49]: unicodedata.normalize("NFKD", a[0])
Out[49]: '789 €'
Upvotes: 2