<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> <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=37474/*http://promo.yahoo.com/broadband/ ">Yahoo! DSL</a> Something to write home about. Just $16.99/mo. or less