I am looking for a solution in google spreadsheet to check if a domain has any content on its site or shows a blank page/brings a 404 error.
I am looking for a way to get two different outcomes (1 and 0) by these requirements:
- 1 if domain is existing and there is content on this domain
- 0 if domain is not existing
- 0 if domain is existing but can't be reached (404)
- 0 if domain is existing and can be reached but has a blank page
Examples are found in the following spreadsheet: https://docs.google.com/spreadsheets/d/1gcdF_NdhYX4vBJgwP-cAVsTmeO2WgrynND2f63Zi3Lk/edit#gid=0
I was trying to get some date from the domains with IMPORTDATA, IMPORTHTML and IMPORTXML (as a next step I would add another column that gives me 1 if content is not cell is not empty, 0 else:
=if(isna(IMPORTDATA(A1))=FALSE;1;0)
=if(isna(importhtml(A9;"list";1));"";transpose(IMPORThtml(A9;"list";1)))
=IMPORTXML(A13;"//h:h1")
But these formulas are not reliable enough to handle the task. I'd be a big fan of IMPORTXML, but as I read so far it is currently not working in new google spreadsheets (not even the official examples are working for me...).
Is there any way to solve this problem for about 1000 domains? Thanks in advance!