I need assistance with creating an import XML formula. I have a URL that changes partially, and it contains a hidden category ID that varies depending on the article. The URL isn’t straightforward but rather a long and complex string. With the unique Identifer
“categoryId”:”xxxxxx” (see screenshot)
I can not seem to figure out how to extract only the cat. ID number, as it is not a direct part of the URL but embedded within a longer structure.
I have tried to simply copy the XML path
=IFNA(regexextract(IMPORTXML(B3,"/html/body/script[1]/text())))","[0-9]+")))
and also to assign the clear identifiyer.
=IFNA(regexextract(IMPORTXML(B2,"//script[contains(., 'categoryId')]/text()")))
Also the workaround as in Tab Try 2 , that i first extract the script content and than find the categoryId within the script content, is not giving me the needed result.
=IMPORTXML(B2, "/html/body/script[1]/text()")
=REGEXEXTRACT(C2, """categoryId"":""(d+)""")
Does anyone have another solution of can see what am I doing wrong?
Thank you
Google Sheet