官术网_书友最值得收藏!

Getting ready

The code for these snippets is in 02/03_lxml_and_xpath.py in case you want to save some typing.  We will start by importing html from lxml, as well as requests, and then load the page.

In [1]: from lxml import html
...: import requests
...: page_html = requests.get("http://localhost:8080/planets.html").text
By this point, lxml should be installed as a dependency of other installs.  If you get errors, install it with pip install lxml.
主站蜘蛛池模板: 秦安县| 荔波县| 高平市| 大安市| 禄劝| 城步| 彩票| 石楼县| 东乌珠穆沁旗| 罗田县| 察隅县| 秦皇岛市| 浮山县| 东海县| 承德市| 永吉县| 雷州市| 东城区| 婺源县| 洪泽县| 财经| 通辽市| 靖边县| 襄城县| 普洱| 永吉县| 蒙城县| 凉山| 重庆市| 谷城县| 涞水县| 湘乡市| 庆安县| 台南县| 常州市| 子洲县| 吉水县| 资讯 | 辰溪县| 衡南县| 睢宁县|