记录小白学习python爬虫的过程(一)
囫囵吞枣python的基本语法后,我安装了python3.6.4和pycharm2017,开始了python爬虫之旅。
import lxml.html,requests
url = 'https://www.python.org/dev/peps/pep-0020/'
xpath = '//*[@id="the-zen-of-python"]/pre/text()'
res = requests.get(url)
ht = lxml.html.fromstring