简单的爬取淘宝



```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import urllib.request

url = "http://www.tybai.com"
# url = "http://www.baidu.com"

html_bytes = urllib.request.urlopen(url).read()
html = html_bytes.decode("UTF-8")

print(html)

![在这里插入图片描述](https://img-blog.csdnimg.cn/20200428114419564.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDk0MDE0NQ==,size_16,color_FFFFFF,t_70)

你可能感兴趣的:(简单的爬取淘宝)