There seems to be a bug when
XPathOnUrl() to extract values which are not enclosed in quotes. I believe the same bug may exist with other functions such as
CsQueryOnUrl(). I'm using SeoTools v8.0.6.
For example, I need to extract the Hreflang codes from https://www.walmart.ca/en, where the actual tags look like this:
<link rel=alternate hreflang=x-default href="/" /> <link rel=alternate hreflang=en-ca href="/en" /> <link rel=alternate hreflang=fr-ca href="/fr"/>
Note that the values for the
hreflang properties are not enclosed in quotes such as
The following syntax should work, but it returns a null value:
=Dump( XPathOnUrl( "https://www.walmart.ca/en", "//*[@hreflang]", "hreflang" ) )
I've also tried using the "html" mode as well as blank attributes, but those had the same result.
To verify, I used
PhantomJsCloud.XPath as follows, and all 3 Hreflang codes are correctly returned:
=Dump( Connector("PhantomJsCloud.XPath", "https://www.walmart.ca/en", "//*[@hreflang]", "hreflang", TRUE, "us") )