Whether it's javascript and/or ajax, flash or any plugin, at the end of the day, it's mostly HTTP request and response that is sent and received by the browser.
For your case, use Chrome or Firefox, open the developer tab and monitor the network traffic of all requests and response. See what is fire off from the webpage when you click on what you want to see and click on the submit or any UI button.
It should response to one or more HTTP requests, you can always use any method from programmatic, or utility like wget or curl or so forth to send the http request over yourself and get back the intended response. What you want is the data, not how they are shown on the screen unless the rendering matters to you.
Just to give you an idea. I have this iphone sales script that run in my server in AWS when iphones are about the launch. The iphone sales page is quite interesting, but at the end of the day, what I'm interested in is to find out when Apple store opens for iPhone
Using firefox, I found out what evetually matters is the Ajax call of the following
Code:
curl 'http://store.apple.com/sg/buyFlowVariationUpdate/IPHONE5S?option.dimensionColor=gold&option.dimensionCapacity=16gb&carrierPolicyType=UNLOCKED&node=home%2Fshop_iphone%2Ffamily%2Fiphone5s&step=select'
{"body":{"content":{"selected":{"productTitle":"iPhone 5s 16GB Gold Unlocked","productImage":"<img class=\"ir\" src=\"http://store.storeimages.cdn-apple.com/7390/as-images.apple.com/is/image/AppleInc/2013-iphone5s-gold?wid=110&hei=78&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,1.5,0,0&iccEmbed=0&layer=comp&.v=1378488417662\" width=\"110\" height=\"78\" data-scale-params-2=\"wid=220&hei=156&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,1.5,0,0&iccEmbed=0&layer=comp&.v=1378488417662\" />","purchaseOptions":{"financing":"\n\t\t\t\t\n\t\n\t\t\n\t\t\t\t\n\t\t \t\n \n <a href=\"http://store.apple.com/sg/browse/campaigns/financing\" target=\"_blank\">Financing Available<\/a>\n\n<!--\n12 months interest-free<br>\ninstallment plan available.<br>\n<a href=\"http://store.apple.com/sg/browse/campaigns/financing\" target=\"_blank\">Learn more<\/a>\n-->\n\n\n \n\n\n\t\t \n\t\t\t\n\t\n\n\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t","price":"\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\n\t\n\t\t\n\t\t\t<span class=\"current_price\">\n\t\t\t\t\n\t\t\t\t\t<span itemtype=\"http://schema.org/Offer\" itemprop=\"offers\" itemscope=\"itemscope\">\n\t\t\t\t\t\n\n\t\t\t\t\t\t<meta itemprop=\"priceCurrency\" content=\"SGD\"><\/meta>\n\t\t\t\t\t\t<span itemprop=\"price\">\n\t\t\t\t\t\t\tS$ 988.00\n\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/span>\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\n\t\t\n \n\t\n\t\n\n\n\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t","shippingPrice":"\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t<span class=\"free-shipping\">Free Shipping<\/span>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t","shippingLead":"\n\t\t\t\t\n <span class=\"shipping-description\">\n \t\n\t \t\n\t \tAvailable to ship<b>:<\/b><br/>\n\t \n\t <span class=\"customer_commit_display\">Currently unavailable<\/span>\n\t \n\t \n\t \n\t \n\t \n <\/span>\n\n\n\n\n\t\t\t","promotions":" ","isBuyable":false},"partNumber":"MF354ZA/A"},"socialSharingDisplay":"\n \t\n \n \n\t<ul class=\"socialsharing\">\n\t\t\n\t\t\t<li class=\"facebook\">\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\t<a target=\"popup-w600-h450\" class=\"facebook\" id=\"facebook\" href=\"/sg/socialsharing/redirect?dn=sp&partner=facebook&uri=%252Fsg%252Fbuy-iphone%252Fiphone5s%253Fcid%253Diphone&uh=-1099047713\" data-evar1=\"AOS: \">\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<span>Share<\/span>\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t<span class=\"a11y\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tShare on Facebook\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/li>\n\t\t\n\t\t\t<li class=\"twitter\">\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\t<a target=\"popup-w600-h256\" class=\"twitter\" id=\"twitter\" href=\"/sg/socialsharing/redirect?dn=sp&partner=twitter&uri=%252Fsg%252Fbuy-iphone%252Fiphone5s%253Fcid%253Diphone&uh=-1099047713\" data-evar1=\"AOS: \">\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<span>Tweet<\/span>\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t<span class=\"a11y\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tShare on Twitter\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/li>\n\t\t\n\t<\/ul>\n\n \n\n\n \t"}},"head":{"status":"200","data":{}}}
Notice it's a bunch of text as response in JSON format. Parse the JSON and it gives me this
Code:
{
"body": {
"content": {
"selected": {
"partNumber": "MF354ZA/A",
"productImage": "<img class=\"ir\" src=\"http://store.storeimages.cdn-apple.com/7390/as-images.apple.com/is/image/AppleInc/2013-iphone5s-gold?wid=110&hei=78&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,1.5,0,0&iccEmbed=0&layer=comp&.v=1378488417662\" width=\"110\" height=\"78\" data-scale-params-2=\"wid=220&hei=156&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,1.5,0,0&iccEmbed=0&layer=comp&.v=1378488417662\" />",
"productTitle": "iPhone 5s 16GB Gold Unlocked",
"purchaseOptions": {
"financing": "\n\t\t\t\t\n\t\n\t\t\n\t\t\t\t\n\t\t \t\n \n <a href=\"http://store.apple.com/sg/browse/campaigns/financing\" target=\"_blank\">Financing Available</a>\n\n<!--\n12 months interest-free<br>\ninstallment plan available.<br>\n<a href=\"http://store.apple.com/sg/browse/campaigns/financing\" target=\"_blank\">Learn more</a>\n-->\n\n\n \n\n\n\t\t \n\t\t\t\n\t\n\n\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t",
"isBuyable": false,
"price": "\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\n\t\n\t\t\n\t\t\t<span class=\"current_price\">\n\t\t\t\t\n\t\t\t\t\t<span itemtype=\"http://schema.org/Offer\" itemprop=\"offers\" itemscope=\"itemscope\">\n\t\t\t\t\t\n\n\t\t\t\t\t\t<meta itemprop=\"priceCurrency\" content=\"SGD\"></meta>\n\t\t\t\t\t\t<span itemprop=\"price\">\n\t\t\t\t\t\t\tS$ 988.00\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t</span>\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\n\t\t\n \n\t\n\t\n\n\n\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t",
"promotions": " ",
"shippingLead": "\n\t\t\t\t\n <span class=\"shipping-description\">\n \t\n\t \t\n\t \tAvailable to ship<b>:</b><br/>\n\t \n\t <span class=\"customer_commit_display\">[COLOR="Red"][B]Currently unavailable[/B][/COLOR]</span>\n\t \n\t \n\t \n\t \n\t \n </span>\n\n\n\n\n\t\t\t",
"shippingPrice": "\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t<span class=\"free-shipping\">Free Shipping</span>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t"
}
},
"socialSharingDisplay": "\n \t\n \n \n\t<ul class=\"socialsharing\">\n\t\t\n\t\t\t<li class=\"facebook\">\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\t<a target=\"popup-w600-h450\" class=\"facebook\" id=\"facebook\" href=\"/sg/socialsharing/redirect?dn=sp&partner=facebook&uri=%252Fsg%252Fbuy-iphone%252Fiphone5s%253Fcid%253Diphone&uh=-1099047713\" data-evar1=\"AOS: \">\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<span>Share</span>\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t<span class=\"a11y\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tShare on Facebook\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t</li>\n\t\t\n\t\t\t<li class=\"twitter\">\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\t<a target=\"popup-w600-h256\" class=\"twitter\" id=\"twitter\" href=\"/sg/socialsharing/redirect?dn=sp&partner=twitter&uri=%252Fsg%252Fbuy-iphone%252Fiphone5s%253Fcid%253Diphone&uh=-1099047713\" data-evar1=\"AOS: \">\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<span>Tweet</span>\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t<span class=\"a11y\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tShare on Twitter\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t</li>\n\t\t\n\t</ul>\n\n \n\n\n \t"
}
},
"head": {
"data": {},
"status": "200"
}
}
What I'm interested in is the text in RED(scroll to the right). The existent of it certainly tell me what I want to know. This is web scraping. I pick out what I want to know. I don't need to follow the workflow of the webpage exactly. Get what I'm talking about ?