M
M
Margo Lionova2021-09-23 22:00:18
Parsing
Margo Lionova, 2021-09-23 22:00:18

How to parse image url using google sheets?

The task is this: to parse 5 url links of photos from here to Google spreadsheets with subsequent upload to VK. https://item.taobao.com/item.htm?spm=a1z10.3-cs.w...

614cce75864da702086617.png

Trying to parse the url to the very first image with =IMPORTXML(A1;"//*[@id='J_Tb -Viewer-Original-0']") - where A1 is a link to the page, but I always get an error about the lack of data to import.

614ccee64eca5243249370.png

I have about half a thousand such pages, it takes too long to do it manually. It seems nothing complicated, but the feeling that I am beating at a closed door, there is very little information on the Internet on this topic.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Fov, 2021-09-23
@Proshypomochi

Xpath in google tables is not about dynamically added html. This is about what the server gives when requested.

=IMPORTXML(A1;"//ul[@class = 'tb-thumb tb-clearfix']/li[position() = 1]/div/a/img/@data-src")

=REGEXREPLACE(B1; "_50x50\.jpg$"; "")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question