属性获取
例如
<li class="item-0"><a href="https://ask.hellobi.com/link1.html">first item</a></li>
我们采用 html.xpath(‘//li/a/@href’) 得到 first item
https://zhuanlan.zhihu.com/p/29436838
https://www.cnblogs.com/lei0213/p/7506130.html
含 contains 的 @class 用法
html.xpath(“//div[contains(@class, ‘rec-received’)]/div/hs-cards-directive/article/a/@href”)
不含 contains 的 @class 用法
html.xpath(“//div[@class=’content’]//h3/a/@href”)