Last active
December 3, 2018 08:38
-
-
Save mindeng/07295dee5a1fa0fdc7bfc4680d16518a to your computer and use it in GitHub Desktop.
Revisions
-
mindeng revised this gist
Dec 3, 2018 . No changes.There are no files selected for viewing
-
mindeng created this gist
Dec 3, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ // xpath of items var jd_items_in_cart = '//*/div[1]/div[2]/div/div[2]/div[1]/a'; var items = document.evaluate(jd_items_in_cart, document, null, XPathResult.ANY_TYPE, null); while(item=items.iterateNext()) { console.log(item.href); }