For my crawler project, I need to get product details from JavaScript object.
How can I effectively get object details from the following JavaScript? I Use XPath and HTMLAgilityPack.
<script type="text/javascript">
var product = {
identifier: '2051189775', //PRODUCT ID
fn: 'Fit- Whiskered Dark Wash Skirt',
category: ['sale'],
brand: 'Brand Name',
price: '22.90', // this would be the discount price
amount: '31.80', // this would be the original price
currency: 'USD',
//List can me even more.
};
</script>
I've not tried getting details from JavaScript objects before. I was getting details directly from HTML for other crawlers.