sloggerkhan
October 8th, 2008, 12:17 AM
I'd like to make it so that I can run a python script to post a block of text to my personal drupal site without having to open up a browser and login, however, I find myself a bit baffled.
So far I am aware of urllib2, which I've been able to use to load the text of my webpage. However, I haven't been able to find good information about how to send the login back or navigate from the main page to posting my content.
I've also been looking at giving pykhtml a shot (http://paul.giannaros.org/pykhtml/), though I'd rather not have the kde dependencies.
Unfortunately, the
browser = pykhtml.Browser()
declaration seems to have an error within pykhtml itself.
So what is the best way to navigate and submit information to a website using python?
So far I am aware of urllib2, which I've been able to use to load the text of my webpage. However, I haven't been able to find good information about how to send the login back or navigate from the main page to posting my content.
I've also been looking at giving pykhtml a shot (http://paul.giannaros.org/pykhtml/), though I'd rather not have the kde dependencies.
Unfortunately, the
browser = pykhtml.Browser()
declaration seems to have an error within pykhtml itself.
So what is the best way to navigate and submit information to a website using python?