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.
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');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.