Re: Python program that validates an url against w3c markup validator

2006-11-29 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "yaru22" <[EMAIL PROTECTED]> wrote: > I'd like to create a program that validates bunch of urls against the > w3c markup validator (http://validator.w3.org/) and store the result in > a file. > > Since I don't know network programming, I have no idea how to start

Re: Python program that validates an url against w3c markup validator

2006-11-29 Thread Gabriel Genellina
At Wednesday 29/11/2006 02:29, yaru22 wrote: I'd like to create a program that validates bunch of urls against the w3c markup validator (http://validator.w3.org/) and store the result in a file. Since I don't know network programming, I have no idea how to start coding this program. Why not u

Re: Python program that validates an url against w3c markup validator

2006-11-28 Thread Fredrik Lundh
Fredrik Lundh wrote: > >>> f = urllib.urlopen("http://validator.w3.org/check?uri="; + uri) > >>> print f.headers here's the specification, btw: http://validator.w3.org/docs/api.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Python program that validates an url against w3c markup validator

2006-11-28 Thread Fredrik Lundh
yaru22 wrote: > I'd like to create a program that validates bunch of urls against the > w3c markup validator (http://validator.w3.org/) and store the result in > a file. > > Since I don't know network programming, I have no idea how to start > coding this program. > > I was looking at the python

Re: Python program that validates an url against w3c markup validator

2006-11-28 Thread Bjoern Schliessmann
yaru22 wrote: > I was looking at the python library and thought urllib or urllib2 > may be used to make this program work. > > But I don't know how to send my urls to the w3c validator and get > the result. Another great alternative is using the Twisted framework:

Re: Python program that validates an url against w3c markup validator

2006-11-28 Thread [EMAIL PROTECTED]
urls = [("/tmp/validate1.html", "http://www.theage.com.au";)] for url, outputfile in urls: commandString = 'wget -o %s http://validator.w3.org/check?uri=%s' % (outputfile, url) system.exec(commandString) is one easy way. yaru22 wrote: > I'd like to create a program that validates bunch of