some site login problem help plz..

Diez B. Roggisch deets at nospam.web.de
Mon Oct 5 04:26:08 EDT 2009


james27 wrote:

> 
> hello..
> im new to python.
> i have some problem with mechanize.
> before i was used mechanize with no problem.
> but i couldn't success login with some site.
> for several days i was looked for solution but failed.
> my problem is , login is no probelm but can't retrieve html source code
> from opened site.
> actually only can read some small html code, such like below.
> 
> <html>
> <script language=javascript>
> location.replace("http://www.naver.com");
> </script>
> </html>
> 
> i want to retrive full html source code..but i can't . i was try with
> twill and mechanize and urllib and so on.
> i have no idea.. anyone can help me?

Your problem is that the site uses JavaScript to replace itself. Mechanize
can't do anything about that. You might have more luck with scripting a
browser. No idea if there are any special packages available for that
though.

Diez



More information about the Python-list mailing list