Parse ½ as 0.5 in Python 2.7
<p>I am scraping <a href="http://www.sportsbookreview.com/betting-odds/ncaa-basketball/1st-half/?date=20150108">this link</a> with <code>BeautifulSoup4</code></p>

<p>I am parsing page HTML like this</p>

<pre><code>page = BeautifulSoup(page.replace('ISO-8859-1', 'utf-8'),"html5lib")
</code></pre>

<p>You can see the values like these <code>-4 -115</code> (separated by <code>-</code>)</p>

<p>I want both values in a list so I am using this regex.</p>

<pre><code>value = re.findall(r'[+-]?\d+', value)
</code></pre>

<p>It works perfectly but not for these values <code>+2½ -102</code>, I only get <code>[-102]</code></p>

<p>To tackle this, I tried this too</p>

<pre><code>value = value.replace("½","0.5")
value = re.findall(r'[+-]?\d+', value)
</code></pre>

<p>but this gives me error about encoding saying I have to set encoding of my file.</p>

<p>I also tried setting <code>encoding=utf-8</code> at top of file but still gives same error.</p>

<p>I need to ask how do I convert <code>½</code> to <code>0.5</code></p>