import socket

sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)


sk.connect(("www.baidu.com",80))

sk.send(b"GET / HTTP/1.1\r\nHost:www.baidu.com\r\nConnection: close\r\n\r\n")

data = []

while True:
    TempData = sk.recv(1024)
    if TempData:
        data.append(TempData)
    else:
        break

dataStr = (b''.join(data)).decode('utf-8')

sk.close()

print(dataStr)
3605dc15e2fdb9bd495832f979167d700104c80b
<mask token>

<mask token>
sk.connect(('www.baidu.com', 80))
sk.send(b'GET / HTTP/1.1\r\nHost:www.baidu.com\r\nConnection: close\r\n\r\n')
<mask token>
while True:
    TempData = sk.recv(1024)
    if TempData:
        data.append(TempData)
    else:
        break
<mask token>
sk.close()
print(dataStr)

<mask token>
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk.connect(('www.baidu.com', 80))
sk.send(b'GET / HTTP/1.1\r\nHost:www.baidu.com\r\nConnection: close\r\n\r\n')
data = []
while True:
    TempData = sk.recv(1024)
    if TempData:
        data.append(TempData)
    else:
        break
dataStr = b''.join(data).decode('utf-8')
sk.close()
print(dataStr)

import socket
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk.connect(('www.baidu.com', 80))
sk.send(b'GET / HTTP/1.1\r\nHost:www.baidu.com\r\nConnection: close\r\n\r\n')
data = []
while True:
    TempData = sk.recv(1024)
    if TempData:
        data.append(TempData)
    else:
        break
dataStr = b''.join(data).decode('utf-8')
sk.close()
print(dataStr)

import socket

sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)


sk.connect(("www.baidu.com",80))

sk.send(b"GET / HTTP/1.1\r\nHost:www.baidu.com\r\nConnection: close\r\n\r\n")

data = []

while True:
    TempData = sk.recv(1024)
    if TempData:
        data.append(TempData)
    else:
        break

dataStr = (b''.join(data)).decode('utf-8')

sk.close()

print(dataStr)