Looking for best approach to to capture the follow datapoints out of an online HTML file.
I tried setting up a Chrome session and looked for the datapoints via ChromeFindElements
but they all come back empty. or zero.
Any suggestions on an approach to capture data points which appear in the source as follows?
Code: Select all
<script type="text/javascript">
infoDataLayer = [
{
"pageType" : "product",
"topLevelCategory" : "Computer",
"productCategory" : "Computer Hardware New",
"isbn" : "9781484267000",
"productId" : "9781484267000",
"pPriceGross" : "99.99",
"ePriceGross" : "89.99",
"eIsbn" : "9781484267000",
"pIsbn" : "9781484267000",
"fn" : "Example Title",
"description" : "1 descript 2 go",
"currency" : "UK",
"url" : "https://someurl.com/9781484267000",
"photo" : "https://someurl.com/pic/images/9781484267000.jpg",
"ecommerce" : {
"currencyCode" : "UK",
"detail" : {
"products" : [ {
"name" : "1 descript 2 go",
"id" : "978-1-4842-6700-0",
"price" : "99.99",
"brand" : "XYZ",
"category" : "Computer Hardware",
"variant" : "ibo",
"dimension21" : "ABC",
"dimension22" : "-92"
}, {
"name" : "1 descript 2 go",
"id" : "978-1-4842-6700-0",
"price" : "99.99",
"brand" : "XYZ",
"category" : "Computer Hardware",
"variant" : "hardcopy",
"dimension21" : "ABC",
"dimension22" : "-227"
} ]
}
},
"content" : {
"authorization" : {
"status" : false
}
}
}
];
publicDataLayer = publicDataLayer || [];
combineDataLayer = sprMerge(publicDataLayer, infoDataLayer);
</script>