How can I wget from a website that doesn't provide direct links?

2

I'm trying to download a large file from this website onto a remote server running CentOS. Usually, I simply right click the link, copy the address, then wget [address], but this website has weird right click responses.

Anyone know how I can download files from this website using the command line?

Edit: It seems this website is rather hard to deal with (see comments). For my purpose, I had to go through downloading the file and then scping it to the server. Thanks for the replies everyone.

Novice

Posted 2016-09-21T23:53:55.253

Reputation: 21

4That specific site uses javascript to handle click events. The URLs are automatically generated and contain ids unique to the request. Therefore, without an API interface etc. it is assumedly rather hard to download files by the command line. You could try to mimic that website's behavior when a user clicks a link, but I'm not sure if it's worth the effort. – taTrifynor – 2016-09-22T01:34:05.650

Answers

0

Have you tried a command line browser like Lynx? http://lynx.browser.org/

Ram

Posted 2016-09-21T23:53:55.253

Reputation: 977

The server already has Firefox, but it is incredibly slow to navigate for some reason. Besides, I'd much rather to just do with a single command. – Novice – 2016-09-22T01:27:07.367

0

Please clarify "weird right click responses." Try right click anywhere on the page and choose Inspect (inspect element). Navigate to the link you want and see if you can find the URL that way.

If the URL is dynamic or doesn't link directly to a file, try cURL:

curl -L "http://yoururl.com/file0883"

The -L option tries to resolve redirects.

László Kovács

Posted 2016-09-21T23:53:55.253

Reputation: 21

1When I right click, it gives me options (preview file, preview in new window, or download). When I click download, it gives me a prompt which I have to OK in order to start the download.

I tried to curl -L [page I linked above] but it didn't work. Also, I couldn't find the URL using inspect element... – Novice – 2016-09-22T01:35:22.793