Yagami 1 Posted November 23, 2017 Report Share Posted November 23, 2017 Hi guys, I just discovered xpath and holly cow, this thing is so powerful. At first I was like "Ok, why complicate things when I can use REGEX and wildcards?" Then I watched a video on how to extract URL and classes, than I was shocked at the simplicity of the thing. With a simple line of code (see below) I was able to extract, decode & put in a list the offset of the class I wanted, where before I had to set variable (for new list item), create a loop, set a list, add to list, create a REGEX, decode & increment, 7 lines in total. alert($plugin function("HeopasCustom.dll", "$Heopas Xpath Parser", $plugin function("HeopasCustom.dll", "$Heopas Text Encode/Decode", "HTML Decode", %followers), "//div[@class=\'_st _ss _sw _sk _5j _sm _sq _no _np _nq _nr\']", "InnerText", "")) So I just wanted to say to newbies like me, check xpath out, it really deserve it. You'll thank me later.You can start by downloading the free plugin and tutorial (75 min of videos) here: https://www.bot-factory.com/ For advanced users, is there any free tools that help create xpath expressions? Thank you, Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 26, 2017 Report Share Posted November 26, 2017 Yes xpath is powerful and my favorite way to scrape actually. Regex is great but when you have an html document then using something like xpath is always going to be better. Regex is great when other things don't work, like if you have a block of text and need to search inside of it that's when regex is best to use. Quote Link to post Share on other sites
Yagami 1 Posted November 26, 2017 Author Report Share Posted November 26, 2017 Thank you. indeed I was unable to scrape some elements without scraping other unwanted elements. With xPath the problem was quickly fixed. I still need REGEX for finding and replacing. Quote Link to post Share on other sites
cob007 19 Posted February 5, 2018 Report Share Posted February 5, 2018 Looking at the code, why combine heopas plugin with xpath? there is simple xpath parser also, is there any advantage to use heopas code with xpath? Quote Link to post Share on other sites
giganut 109 Posted February 5, 2018 Report Share Posted February 5, 2018 XPath is now my go to, and its really hard for sites to stop you from doing anything. There are some really great resourceshere on the forum that can really help you get really in depth with Xpath. Its truly is the best for botting. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.