>
>> the following code works perfectly
>> import socket, sys
>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>> s.connect(("www.python.org", 80))
>> s.send("GET")
here, You need to speak HTTP protocol. I would suggest to change
s.send( "GET / HTTP/1.0\x0d\x0a\x0d\x0a" )
>> whi
Try this
code
=
import re
p = re.compile(r'([^<]*)<')
s = open("file").read()
m = re.search(p, s)
if m: res = m.groups()[0]
res = res.lstrip("\n")
res = res.rstrip("\n")
print res
result:
===
%python parser.py
Sys Data
Sys-Data
asdkData
Data
%
Thanks
Allan
"rh0dium" <[EMAIL PROTECTED]>