from gevent import monkey
# monkey.patch_all()
import gevent
from urllib.request import urlopen
def f(url):
print('GET:%s' % url)
resp = urlopen(url)
data = resp.read()
# with open('ue2.htm','wb') as f:
# f.write(data)
print('%d bytes received from %s.' % (len(data),url))
# http://tcweb.mytongche.com
gevent.joinall([
gevent.spawn(f,'https://www.baidu.com'),
gevent.spawn(f,'https://www.qq.com'),
gevent.spawn(f,'https://www.csdn.com')
])
# f('http://uyi2.com/team')