Helo All,

I need to write a python script that will automatically log into a website and retrieve a URL once it has logged in. I already know how to fetch the html of a page, but how do I make the script log into the page first?

On the page I want to login, the "Login" button does this:

<input name="Go" type="image" src="images/login.gif" onClick="return _CF_checkFMLSLOGIN(document.FMLSLOGIN)" width="37" height="26" border="0" tabindex="3">

Thanks!

You could use the urllib or urllib2 modules for this task I assume but you could also start from scratch using pure sockets. You would need to learn HTTP Protocol for this and simulate what messages a webbrowser sends to the server hosting the website for the user and password boxes.

here are some good starter websites on HTTP:
en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
www.w3.org/Protocols/
This ones really good:
http://www.jmarshall.com/easy/http/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.