
上QQ阅读APP看书,第一时间看更新
Getting ready
Let's start examining CSS selectors using the same start up code we used in the last recipe. These code snippets are also in the 02/04_css_selectors.py.
In [1]: from lxml import html
...: import requests
...: page_html = requests.get("http://localhost:8080/planets.html").text
...: tree = html.fromstring(page_html)
...: