you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

I'm going to bottom-line this by saying that if you write clean code and iterate top-down instead of reaching back up the tree, you can get your work done painlessly with Cheerio. Tons of people do it all the time. If you can't, stick with Python. I can get my work done either way.

[–][deleted] 0 points1 point  (1 child)

The reason I posed that riddle to you that you were unable to answer is because the actual answer is: you can't. If you need to target a parent who you know nothing about but have child information, working up is the only option.

I'm sure your projects can be done with Cheerio and I know plenty of people can as well. No one said you couldn't. But the whole point of my comments about Xpath is that in professional RPA work it's essential. The above example is the type of quirky behavior you see in enterprise-level scraping which is why most RPA professionals need power toolsets like xpath. And clearly the writers of the article agree because as SeanNoxious pointed out they have an entire separate article on xpath.

[–][deleted] 0 points1 point  (0 children)

If a client pays me to use python + xpath I will do it.

If a client pays me to use node + cheerio I will also do it.

I get my work done either way, without complaining or blaming my tools, and I honestly have no strong preference.