Exactly. But be prepared that the website might change the javascript slightly on each invocation of the website (especially in the form of keys for a sort of challenge response protocol) that you would have to extract from the code.
Comment on Re^2: Fetching a link of a webpage (harder than it seems)