Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
What i have so far: #!/usr/local/bin/python from urllib import urlopen from ClientForm import ParseResponse from re import search URL = "http://www.hal-pc.org/networking/cgi-bin/wepgen.cgi"; pattern = "*([0-9,a-f,]*)" doc = urlopen(URL).read() result = search(pattern, doc) w

Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
What i have so far: #!/usr/local/bin/python from urllib import urlopen from ClientForm import ParseResponse from re import search URL = "http://www.hal-pc.org/networking/cgi-bin/wepgen.cgi"; pattern = "*([0-9,a-f,]*)" doc = urlopen(URL).read() result = search(pattern, doc) w

Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
Max Erickson wrote: > strings are slicable: wep64 = wep128[0:10] sorry for the stupid question. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: web scrapping - POST and auto-login

2005-09-19 Thread Max Erickson
"james hal-pc.org" wrote in news:[EMAIL PROTECTED]: > Max Erickson wrote: the entire 26 character string from site A, but [1] how do i crop it to 10 characters. >> >> strings are slicable: > > The only reason i've gotten this far is a basic understanding of > syntax and programming in

Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
Jonathan Ellis wrote: > "james hal-pc.org" wrote: > >> I'm trying to update the WEP key on a wireless router via script and >>email the results to myself. this will be run once a week. > > > Look up Mechanize (http://wwwsearch.sourceforge.net/mechanize/) or the > more low-level ClientForm by

Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
Max Erickson wrote: >>>the entire 26 character string from site A, but [1] how do i >>>crop it to 10 characters. > > strings are slicable: The only reason i've gotten this far is a basic understanding of syntax and programming in general :) care to enlighten me a little on how to do that? > As

Re: web scrapping - POST and auto-login

2005-09-19 Thread Jonathan Ellis
"james hal-pc.org" wrote: >I'm trying to update the WEP key on a wireless router via script and > email the results to myself. this will be run once a week. Look up Mechanize (http://wwwsearch.sourceforge.net/mechanize/) or the more low-level ClientForm by the same author. This will be _muc

Re: web scrapping - POST and auto-login

2005-09-19 Thread Max Erickson
"james hal-pc.org" wrote in news:[EMAIL PROTECTED]: > "james hal-pc.org" wrote: >> the entire 26 character string from site A, but [1] how do i >> crop it to 10 characters. > > [1] still at a loss on this one, but i can get to it later, > unless you've got any ideas. strings are slicable: >>

Re: web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
"james hal-pc.org" wrote: > the entire 26 character string from site A, but [1] how do i crop it to > 10 characters. [1] still at a loss on this one, but i can get to it later, unless you've got any ideas. > [2] how can i then auto-login to site B (the router's web config via > pop-up dialo

web scrapping - POST and auto-login

2005-09-19 Thread james hal-pc.org
please excuse my ignorance of Python. i know enough to be dangerous (was able however to make Freevo support my FM tuner with a little hacking). Ultimate goal: read N bytes from PATTERN on page A into VARIABLE. POST VARIABLE into TABLE on site B. email VARIABLE to myself. what i have to work wi