Closed LunarDevelopment closed 6 years ago
Hi @LunarDevelopment thanks, I'll look at it asap
I don't think ->xpathQuery("descendant::h3", $node) // new
is a good fix in retrospect, but I'm not good with XPATH - I'll leave the syntax to you..
Happy to help though, love your library!
Hi @LunarDevelopment
Can you confirm that this is merged in version 0.4.3
?
Hey,
I'm getting a Classical Result DOM error every 10 to 30 requests.
I've attached :
BadDom.zip is a ZIP of 4 example DOM files Bridal Accessories Bakewell7560.html.zip is a ZIP of 1 rendered HTML file
Here's a script to parse any of the BadDom files:
Here's an example of a classical result element from the rendered HTML page:
Seems like the error is that h3 class is not always
r
.Your library is better than anything I've ever produced, but my observation would be that in the
ClassicalResult->parseNode()
maybe the old code of->xpathQuery("descendant::h3[@class='r'][1]/a", $node)
is too specific now that a class of LC20lb is sometimes returned on the h3 element - should it be replaced with a more generic:->xpathQuery("descendant::h3", $node)
?I've tested the following and it seems to work in
ClassicalResult->parseNode()
to return the title :If you're happy with it I'll do a pull request with the amendment ?