0x01 初探爬虫

把颖宝照片存到本地。

from urllib.request import urlopen
html = urlopen('https://gss3.bdstatic.com/-Po3dSag_xI4khGkpoWK1HF6hhy/baike/h%3D452/sign=ca0979de71ec54e75eec1b1b8b399bfd/fc1f4134970a304ece29541adbc8a786c8175cc3.jpg')
ms = html.read()
f = open('b.jpg','wb')
f.write(ms)
f.close()

猜你喜欢

转载自blog.csdn.net/weixin_41687289/article/details/80088759