How to convert a String into a BeautifulSoup object?
<p>I'm trying to crawl a news website and I need to change one parameter. I changed it with replace with the next code:</p>

<pre><code>while i &lt; len(links):
    conn = urllib.urlopen(links[i])
    html = conn.read()
    soup = BeautifulSoup(html)
    t = html.replace('class="row bigbox container mi-df-local locked-single"', 'class="row bigbox container mi-df-local single-local"')
    n = str(t.find("div", attrs={'class':'entry cuerpo-noticias'}))
    print(p)
</code></pre>

<p>The problem is that "t" type is string and find with attributes is only applicable to types <code>&lt;class 'BeautifulSoup.BeautifulSoup'&gt;</code>. Do you know how can I convert "t" to that type?</p>