3

I am using Symfony Panther for web scraping. When Google Chrome's version and Chrome driver was 89, everything worked fine. But after updating both versions to 92,

$crawler->filter('h1')->html();

will always return empty string.

I think, the problem is related to this method >html()

Could you please let me know if you have a solution for this.

Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97

1 Answers1

0

In case anyone stumbles onto this issue, I ran into this same problem and found a workaround by getting the first element from the crawler selector then the outerHTML property. Some say innerHTML works but that came up blank.

$crawler->filter( 'h1')->getElement(0)->getDomProperty('outerHTML');
Aaron Belchamber
  • 1,480
  • 1
  • 16
  • 20