想爬节点 img src 后面的链接,最后用"//div[@style='margin-bottom:20px']//img[@src]"解析的不对,刚入门,求解🙏
是这样
"//div[@style='margin-bottom:20px']//img/@src"
写成这样试试:xpath("//div[@style='margin-bottom:20px']//img//@src")