I'm trying to extract some images from a website with Google Sheets in a cell. I find some solutions but it's not working everytime.
What I want to do?
I need to be able to paste a URL and get image's itself and also images embedded URL.
Here is the page that I want to extract - but not only this one. I want to use one column with URL's and other two columns as Image and Image's direct URL.
https://www.freepik.com/free-photo/full-length-cheerful-woman-sweater-posing-with-arm-hip-hile-pointing-looking-away-white-wall_6730124.htm#query=full%20length%20portrait%20of%20a%20pointing%20finger&position=2&from_view=search&track=sph
try:
=LAMBDA(x, {IMAGE(x), x})(QUERY(IMPORTXML(A1, "//img/#src"),
"where Col1 contains 'img.'", ))
Related
I have a IMPORTHTML formula which imports a certain table from a website - but, of course, it doesn't import the images in that table too.
I was wondering how I might be able to do this.
Using vlookup, I have been able to find where the image is and everything, but I have tried using IMAGE() in a number of different places and it will never pull over the data. Really not sure how to do it.
Ideally, I would like to modify the IMPORTHTML formula in A1 to allow it to include images as well, but if I need to put it in D2 like I previously have been, then that's completely ok.
Formulas used in the images:
=IMPORTHTML("https://boards.habbousdf.com/showthread.php?tid=155","table",9)
=VLOOKUP(A2,IMPORTHTML("https://boards.habbousdf.com/showthread.php?tid=155","table",9),3,FALSE)
I was able to achieve this using the formula below
ArrayFormula(image(query(iferror(regexextract(lambda(x,filter(x,scan(,x,lambda(a,c,a+regexmatch(c,"table")))=*{table ID}*))(query(to_text(flatten(importdata("*{URL}*"))),"where Col1<>''",)),"src=.(.*\.png)")),"where Col1<>''",)))
https://www.autowp.ru/cadillac/elr/90868/pictures/e2xpg1
I can't figure out how to get this model of vehicle and it's image url through importxml in google sheets. In my concept you fill the url cell in sheet and you get model of the vehicle and image url in two separate cells but i can't write xpath correctly for this.
For writing the xpath of this image URL, you could try the following steps:
If you are using Google Chrome, you can open the developer tools (Control+Shift+I for Windows, Command+Option+I on MacOS).
Use the "Select Elements" function ①, click on the image ②, and then move the mouse to ③.
Right click, Copy > Copy XPath, and add #src to the end of the XPath.
Now you can get the Google Sheet formula below
=IMPORTXML("https://www.autowp.ru/cadillac/elr/90868/pictures/e2xpg1","/html/body/app-root/div[2]/div[1]/div/app-catalogue-vehicles-pictures-picture/app-picture/div[2]/div[1]/div[1]/span/img#src")
However, as suggested by player0 and Find the Xpath to get data with importxml function, IMPORTXML does not work on JavaScript content. So, in the end, the formula would give the #N/A error, and unfortunately you cannot get the model name and the image URL via IMPORTXML formula.
When ever I upload an image from google forms it shows the result as a URL. How can I get google sheets to show the image that was uploaded instead of the URL?
As standard google sheets will not display a URL as an image, you will need to add an additional formula for this.
=IMAGE(url, [mode], [height], [width])
IMAGE
As an example if you have a google form outputting URLs to column A, using something like:
=ARRAYFORMULA(IF(A:A = "","",IMAGE(A:A)))
In column B will display the image in column B.
I'm trying to extract a cell value from a Google spreadsheet using imacro script.
This is the spread sheet I'm working on.
And I need to get the Cell 'A1' value.
Below is my try, and it is not working.
TAG POS=2 TYPE=A ATTR=TXT:https://www.ebay.com* EXTRACT=TXT
Please help.
One of the possible (simplest) ways is to use Google Query Language for requesting necessary data and extract them afterwards. Something like this:
URL GOTO=https://docs.google.com/spreadsheets/d/13akuXU0cp047_6VFdtUgdn2fKfhPilF_hPHrnTNV164/gviz/tq?tqx=out:html&tq=select%20A%20limit%201
TAG XPATH="//tr[last()]/td" EXTRACT=TXT
Keep in mind that your spreadsheet must be shared in this case.
So I created a list of members in Google Sheets, each member having a profile image, name, location, etc.
I exported this list from import.io, a data extraction tool. The only problem is that when I export it, I get the profile image url for each member, instead of getting the image itself as a thumbnail.
Someone asked a similar question here. I tried using the =image("url") function and it worked, I can see the image.
What I want is a simple way of applying this function to the 200 cells I have that include a link to an image.
Any idea on how this can be achieved?
Thanks
=image() works with Arrayformula
so if your image urls are in rows, starting in cell A1, ending in cell A2, formula in B1 would be =Arrayformula(image(A1:A2)).
Just worked for me.
I created a new column to insert the array formula and referenced the column with the urls.