Extract Data from a specific website. Doesn't Work

Hi,
I'm Daniele from Italy.
I need to extract some data from an italian products website. This is a page for example. From there, I need to extract product name: "Altuzarra"

https://www.it.forzieri.com/ita/product_view.asp?l=ita&c=ita&dept_id=18&sku=zr130417%2D002%2D00
and this is the XPATH url:
/html/body/div[2]/div/section/div/div/div[1]/div/div[1]/h1/span[1]/a

I use an XpathOnUrl function with the two url above. But it doesn't work.

I'm not a pro user, maybe my question is pretty stupid.
I've tried the same workflow and it works perfectly in other website,

Thank you very much for any help.

Daniele.

Hello Daniele,

there might be more elegant ways, but this works:
A1 = https://www.it.forzieri.com/ita/product_view.asp?l=ita&c=ita&dept_id=18&sku=zr130417-002-00
B1 = =XPathOnUrl(A1;"//*[@id='productInfo']/div[1]/div[1]/h1/span[1]/a")

You can also play around and put this into B1 to get more text:
B1 = =XPathOnUrl(A1;"//*[@id='productInfo']")

Andreas

I thank you very much Andreas for your fast and useful answer.

My simple workflow to extract XPATH is this one:

  • Open Mozilla Firefox
  • Right click on the item I need
  • Open the Mozilla Inspector window
  • Right click again on the Inspector window, upon the highlighed item automatically selected for me
  • From the context menu I choose Copy-->XPATH

The working XPATH you gave to me is different.

Can I ask you which way/application you used to extract that working XPATH?

Thanks a lot again for your time.

Daniele.

I use Chrome. I am not sure if the function is directly integrated into Chrome or an extension. I don't have many extensions, the only relevant one is XPath Helper Wizard.
I right-click the required element, and select the last option in the opening menu. I use the German Chrome version. English translation might be "Examine". After that, another window opens at the bottom of the screen in Chrome. The source code of the selected element is now shown. You right-click on the respective line and select "Copy" and "Copy XPath". That's it. Works in most cases for me.

Cheers,
Andreas