Dynamic pages are the worst for xpath text scraping.
Instead of `text()`, try `string()`—it concatenates all text nodes inside the element. Like `string(//div[@class='stuff'])`.
For AJAX, use browser automation tools like Puppeteer or Playwright. They mimic real user interaction.
Pro tip: Always test xpath in DevTools console with `$x("your_xpath")` before coding it.
Instead of `text()`, try `string()`—it concatenates all text nodes inside the element. Like `string(//div[@class='stuff'])`.
For AJAX, use browser automation tools like Puppeteer or Playwright. They mimic real user interaction.
Pro tip: Always test xpath in DevTools console with `$x("your_xpath")` before coding it.
