Dear JavaScript experts,
I am hoping this is a simple question. I am new to JavaScript.
I am trying to download comments from a newspaper website that are delivered in the form of ".js" files. However, the page source code (example page) does not explicitly reference the .js files; they seem to be identified dynamically on the basis of an "articleKey" fed as a parameter into a script. What I would like to do is automatically download the ".js" files for my research.
Now, I have a hunch that the following script snippet is where the action is, but I don't know how to get it working for me. How can I execute this code in such a way that it would reveal the .js file identity / trigger a download? Or maybe I am not even looking in the right place. All I know is that when I "save as" the complete webpage in firefox, I end up with the files I want, like "REL-5-001.js", that are not in the source code. If I'm looking in the wrong place, how can I find where these files came from?
<script type="text/javascript" src="http://www.cbc.ca/i/o/sm/v10/init.js">
var o = {
iconsContainerIds: ['storyhead','right'],
commentsContainerId: 'socialcomments',
articleKey: '2000566132',
commentsEnabled: true,
scmo: 'ApprovalRequired',
scped: '2013/03/05 11:59:00 PM',
scpm: 'Comments are [B]open[/B] and welcome until March0513 at 11:59 p.m. ET.\nWe reserve the right to close comments before then.',
scem: 'This story is now closed to commenting.',
cd: '2013/03/03 12:07:40'
};
</script>
Thank you in advance for your help,
Jordan