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")
while 1:
    buf = s.recv(1000)
    if not buf:
        break
    sys.stdout.write(buf)
s.close()
but the following code does not work
 
import socket, sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("http://www.google.co.in/search?hl=en&q=india&meta=", 80))
s.send("GET")
while 1:
    buf = s.recv(1000)
    if not buf:
        break
    sys.stdout.write(buf)
s.close()
 
the given url is the google search url for the string india.can u suggest some way to access the google search result page through SOCKETS.
 
 

Send instant messages to your online friends http://in.messenger.yahoo.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to