IMPORTFROMWEB_getMeta()

IMPORTFROMWEB_getMeta() is an additional function to IMPORTFROMWEB() available within the same add-on.
It takes as reference a cell that contains an IMPORTFROMWEB() function and returns additional information about the results.

Install this add-on for Free from the G Suite Marketplace

Simple usage

=IMPORTFROMWEB_getMeta(A1)

A1 should be a cell that contains IMPORTFROMWEB()

The output is a range of two columns with the metadatas’ keys in the 1st column and their respective values in the 2nd column, like

hash0726b87296890bbe13e1dd6d34375a9a
values[[[“Product Manager”]]]
updateDate2019-05-02
updateTime22:18:12
executionDurationMs9009
screenshotsUrlshttp://scraper.nodatanobusiness.com/output/63e24780-6d17-11e9-9b60-89ecc1d3cc13/screenshot.png
sourceCodeUrlshttp://scraper.nodatanobusiness.com/output/63e24780-6d17-11e9-9b60-89ecc1d3cc13

Syntax

reference (range)

A reference to a cell containing the IMPORTFROMWEB() function

metaName (optional)

If filled, returns only the value corresponding to the metadata key

split (boolean)

If FALSE and metaName is not filled, returns all the results compressed in one cell
Default to TRUE

Ouptut

hash

A unique id for the IMPORTFROMWEB() function.

In case the exact same function is copied from one cell and pasted into another cell, the engine will call the same instance of IMPORTFROMWEB(). Hence the two cells will return the same id.

values

A JSON object representing the results of the function

updateDate

The date of the last update

updateTime

The time of the last update

updateDate and updateTime are particularly useful to control if the results returned are fresh

executionDurationMs

How long it took for the function to execute. The duration can vary according to the number of urls in the first parameter and whether the engine had to run javascript in order to retrieve the elements

screenshotsUrls

In case the option takeScreenshot has been set to TRUE, returns the paths to view the screenshots generated by the function.

The screenshot is not a loyal representation of the page because the engine tries to load as few resources as possible, which means it might remove the styles and the images. This is useful for debugging in case the results returned are not as expected

SourceCodeUrls

In case the option saveSourceCode has been set to TRUE, return the paths to load an HTML version of the page as seen by the engine.

Like the screenshotsUrls meta, this information is useful for debugging.

Leave a Reply

Your email address will not be published. Required fields are marked *