1 2 3 4 5 6 7 8 9 10 11 12 |
//a[contains(@href, 'article') and contains(@href,'html')]/@href //a[contains(@href,'/article/')]/@href //a[contains(@href, '://')] //button[contains(text(),"Go")] //*[starts-with(@id, 'sometext') and ends-with(@id, '_text')] //*[matches(@id, 'sometext\d+_text')] //a[contains(@href, 'hot') or contains(@href, 'gl') or contains(@href, 'xyk') and contains(@href,'html')]/@href //input[@name="username"] | //input[@id="wm_login-username"] //a[contains(@href, 'xyk') and contains(@href,'htm') and not(contains(@href, 'zt')) ]/@href| //a[contains(@href, 'hot') and contains(@href,'html')]/@href |
不会 xpath 的朋友可以参考 https://devhints.io/xpath

