First one is using http and second one https, did you try an https handler? as I already pointed out to you in other thread with the same topic...<br><br>Please don't spam the list, if you aren 't getting the answers you was looking for, wait for a while and then repost not just open threads until get the answer<br>
<br><div class="gmail_quote">2011/8/15 Steven D'Aprano <span dir="ltr"><<a href="mailto:steve%2Bcomp.lang.python@pearwood.info">steve+comp.lang.python@pearwood.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">守株待兔 wrote:<br>
<br>
> 1.<a href="http://www.renren.com/Login.do" target="_blank">http://www.renren.com/Login.do</a><br>
> it is ok,my code:<br>
</div>[...]<br>
<div class="im">> 2.<a href="https://passport.baidu.com/?login" target="_blank">https://passport.baidu.com/?login</a><br>
> can't login,my code:<br>
</div>[...]<br>
<br>
Do you have a question, or are you just sharing the bad news?<br>
<br>
Websites may choose to respond to login attempts differently. Some may<br>
require cookies, some may not. Some may check the referrer, some may not.<br>
Some may look at the user agent, some may not.<br>
<br>
If the web developer of the site insists that you log in with a browser, or<br>
Internet Explorer, you have to fight to convince the web server to let you<br>
in. Many websites really try hard to prevent bots and scripts logging in.<br>
The closer you can imitate what a real human being in a browser does, the<br>
better the chances you can fool the server that you are a real human being<br>
using a browser and not a bot. (Since your script *is* a bot, you may also<br>
be in violation of the web site's terms of service.)<br>
<br>
Some web sites may even check how often you try to log in, or how fast.<br>
<br>
But what makes you think you can't log in? Given the response below, it<br>
looks to me that you did log in, and got a blank page with some javascript<br>
to redirect you to the real content page. (If you are a web developer and<br>
you do this, I hate you.) But I may be wrong -- I'm not an expert on these<br>
things.<br>
<div class="im"><br>
<br>
> <!--STATUS OK--><br>
> <html><head><title>������§��������      </title><br>
> <meta http-equiv=content-type content="text/html; charset=gb2312"><br>
> <META http-equiv='Pragma' content='no-cache'><br>
> </head><br>
> <body><br>
><br>
><br>
><br>
>             <script><br>
>             var url="./?pwd=1"<br>
>             url=url.replace(/^\.\//gi,"<a href="http://passport.baidu.com/" target="_blank">http://passport.baidu.com/</a>");<br>
>             location.href=url;<br>
>             </script><br>
><br>
><br>
><br>
> </body><br>
> </html><br>
<br>
<br>
</div>--<br>
Steven<br>
<font color="#888888"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>