jethro10
September 1st, 2008, 01:54 PM
Hi,
I am a competent(?) enough programmer but it's with web pages in asp.net on MS platforms.
I tried python a little a while ago as it seems to be a big one on Linux but gave up due to lack of interest. I usually have to to have a need to learn something and here it is!
On a Qnap NAS I have, some data I want to viev in logs are several clicks away. I have found using wireshark sniffer that a properly formatted http://bla-bla/cgi/bla-bla page on the qnap gives me my results without going thru the menus but I still need to authenticate, Firefox askes username/password.
This is a perfect example of a desire to force me to learn.
I've seen I will use httplib (libraries?) in python so am getting there.
I want to get this web page, authenticate if necessary then I can parse the HTMP for the data I wan't. Eventually building up to a monitor program I suppose for various bits.
Can someone with more knowledge in this area here point me to a sample code of authenticating and reading a page from a web server using python? It's the authenticating bit that seems fuzzy in my googling for answers, perhaps I just don't know what i'm looking for.
Thanks
Jeff
I am a competent(?) enough programmer but it's with web pages in asp.net on MS platforms.
I tried python a little a while ago as it seems to be a big one on Linux but gave up due to lack of interest. I usually have to to have a need to learn something and here it is!
On a Qnap NAS I have, some data I want to viev in logs are several clicks away. I have found using wireshark sniffer that a properly formatted http://bla-bla/cgi/bla-bla page on the qnap gives me my results without going thru the menus but I still need to authenticate, Firefox askes username/password.
This is a perfect example of a desire to force me to learn.
I've seen I will use httplib (libraries?) in python so am getting there.
I want to get this web page, authenticate if necessary then I can parse the HTMP for the data I wan't. Eventually building up to a monitor program I suppose for various bits.
Can someone with more knowledge in this area here point me to a sample code of authenticating and reading a page from a web server using python? It's the authenticating bit that seems fuzzy in my googling for answers, perhaps I just don't know what i'm looking for.
Thanks
Jeff