<div id="RTEContent">  <pre>Hello, I had a question about urllib2's  build_opener() statement. I am trying to just get the html from any  webpage as a string but I need everything on the page to be the same as  what it'd be if I would browse to that page (and at the very least, all  the href's). This is my code:<br>  <br>  <br>  url = '<a href="http://news.yahoo.com/fc/world/iraq%27">http://news.yahoo.com/fc/world/iraq'</a><br>  req = Request(url)<br>  f = build_opener().open(req)<br>  page = f.read()<br>  f.close()<br><br>  return page<br>      so looking at the source of the page browsing to the  page, one of the links has an href that looks like this:<br>  <br>  href = <br>  <br><a href="http://news.yahoo.com/s/ap/20051118/ap_on_re_mi_ea/iraq_051118153857;_ylt=AiPsFWWIyLLbGdlCQFLMn8NX6GMA;_ylu=X3oDMTBiMW04NW9mBHNlYwMlJVRPUCUl">http://news.yahoo.com/s/ap/20051118/ap_on_re_mi_ea/iraq_051118153857;_ylt=AiPsFWWIyLLbGdlCQFLMn8NX6GMA;_ylu=X3oDMTBiMW04NW9mBHNlYwMlJVRPUCUl</a><br>  <br> 
 <br>  after running the code and looking at the returned page's same link, it looks like this:<br>  <br>  href = <br>  <br><a href="http://192.168.23.106/s/ap/20051118/ap_on_re_mi_ea/iraq_051118153857">http://192.168.23.106/s/ap/20051118/ap_on_re_mi_ea/iraq_051118153857</a><br><br><br>it seems that everything after the semi-colon is missing after running<br>the build_opener(). Is there a way that I can get the page as a string<br>with all the links (href's) to not be missing anything? Thanks.<br><br>-Steve</pre>   </div><p>
        
                <hr size=1>Yahoo! Shopping<br> 
Find Great Deals on Holiday Gifts at <a href="http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1 
">Yahoo! Shopping</a> <p>
        
                <hr size=1>Yahoo! Shopping<br> 
Find Great Deals on Holiday Gifts at <a href="http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1 
">Yahoo! Shopping</a>