I am trying to import data (industry) from yahoo finance to my google sheet tracker. The formula below is able to extract the industry for every single stock that is listed on the US stock exchanges. However, when a stock is listed in Germany for example, and a suffix ".DE" needs to be added the formula stops working. I believe that the "." causes confusion to the URL somehow but cannot figure a way to fix it.
IMPORTXML("https://finance.yahoo.com/quote/"&$A2&"/";"//*[@id='Col2-12-QuoteModule-Proxy']/div/div/div/div/p[2]/span[2]")