[Tutor] Passing HTTP commands through Telnet using Python for web site testing?
adisegna at gmail.com
Thu Nov 17 05:13:02 CET 2005
So far this is what I have come up with doing some research.
for line in urllib.urlopen('http://mywebsit.com/folder/folder/test.asp'):
if '400 Bad Request' in line:
text_file = open("mysite.log", "a")
This writes the to a new line each time the script is run. Now I have to
figure out an "if then else" to write the other possible error codes and
appending a timestamp followed by a space each time it runs.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor