Kdawg
Kdawg

Reputation: 167

wget not following the flashplayer download link

I'm trying to write a script that will download the latest version of the flashplayer tarball and unpack it. Should be simple enough I thought.

But the "Download now" link on this page resolves to "https://get.adobe.com/flashplayer/download/?installer=Flash_Player_11.2_for_other_Linux_(.tar.gz)_64-bit&standalone=1 and when I execute the following line

 wget "http://get.adobe.com/flashplayer/download/?installer=Flash_Player_11.2_for_other_Linux_(.tar.gz)_64-bit&standalone=1"

it yields

 --2015-05-08 08:56:49--  http://get.adobe.com/flashplayer/download
 /?installer=Flash_Player_11.2_for_other_Linux_(.tar.gz)_64- 
 bit&standalone=1
 Resolving get.adobe.com (get.adobe.com)... 192.150.16.58
 Connecting to get.adobe.com (get.adobe.com)|192.150.16.58|:80...  
 connected.
 HTTP request sent, awaiting response... 200 OK
 Length: unspecified [text/html]
 Saving to:  
 `index.html?installer=Flash_Player_11.2_for_other_Linux_(.tar.gz)_64-
 bit&standalone=1.1'

 [ <=>                                     ] 10,904      --.-K/s   in 
 0.06s   

 2015-05-08 08:56:49 (174 KB/s) -  
 `index.html?installer=Flash_Player_11.2_for_other_Linux_(.tar.gz)_64-
 bit&standalone=1.1' saved [10904]

Clearly wget is not understanding the link in the same manner my browser is because the filesize is 174KB instead of 6.91MB.

Can anyone tell me what the problem is/what I should be doing instead? Thanks

EDIT:

found this in the html page

 70              <script>
 71 
 72                                         setTimeout("location.href = 'https://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.457/install_flash_player_11_linux.x86_64.tar.gz';", 2000);
 73 
 74    
 75                 $(function() {
 76                     $("#whats_new_panels").bxSlider({
 77                         controls: false,
 78                         auto: true,
 79                         pause: 15000
 80                     });
 81                 });
 82                 setTimeout(function(){
 83                     $("#download_messaging").hide();
 84                     $("#next_button").show();
 85                 }, 10000);
 86             </script>

If I wget that link it works.

Upvotes: 1

Views: 1059

Answers (1)

serv-inc
serv-inc

Reputation: 38247

As @houssam already said, the given page is a html page that contains a javascript part

setTimeout("location.href = 'https://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.457/install_flash_player_11_linux.x86_64.tar.gz';", 2000);

So if you were to dynamically download it, you would need to extract the new value of the location.href and set your wget to that. Otherwise just use the download link.

Upvotes: 1

Related Questions