PhantomJs Cloud - Return HTML? XpathOnURL

So I use XpathOnURL.

Everything works perfectly fine and my formula returns a table in html format which is what I want.

How can I do this with PhantomJs API? I checked the xml and can't figure out where to modify the connector to return html instead of just the string.

Here's my current working formua:

=XPathOnUrl(A2&B2,"//div[@id='tab3']/div/table",,HttpSettings(TRUE,,,"1020|2040|Host"),"html")

I used the same Xpath using the PhantomJs connector, but it had no option for "Text" or "Html". It always returns text, I'm assuming because it's not json so it defaults to a string value. Can I parse my url and return the actual table?

Full URL I'm testing:
I'm looking for the second table in /div @id = tab3 Where it shows "Availables Sizes & Prices"

Any help would be greatly appreciates. Btw, XpathOnURL works great but even with a 5 second timer between each request It would still take me months to pull the data I need to build a catalog.

I already have a catalog, but I'm looking for ways to clean it up a bit with accurate specifications.

Thanks in advance and Thank you Niels and contributors for this awesome plugin I've recommended it to many.

1 Like

Hi,

Thanks for a great question! The PhantomJs Connector does the xpath requests and SeoTools only requests the final results with a .* regex. Perhaps you can find a parameter which allows for HTML results in the PhamtomJs API documentation?

https://phantomjscloud.com/docs/http-api/index.html

Thanks for the link. I haven't tried it yet, But they show an example request example that may return all possible results:

Here's their sample request using this paramter EXAMPLE - All the way at the end I see quite a bit of returned html elements.

I'll give this a try soon.