wget for links inside html pages

I am trying to download a file from the following repository: https://trace.ncbi.nlm.nih.gov/Traces/sra/?run=SRR7276474

As you can see, there are several layers to the webpage. For example, clicking on the download tab doesn't change the URL and, the link is not a 'download link' per ce - where simply clicking the link automates a download. I have tried some of the answers on the forum, where they have advised using quotes and the operation: wget "url/?target=link". This however does not work in the following instance.

• Thanks, found it. But doesn't wget https://sra-download.ncbi.nlm.nih.gov/traces/sra64/SRZ/007276/SRR7276474/P1TLH.bam work? – terdon Feb 4 '19 at 15:40
• It does! Thank you so much. What is the logic behind it though? Don't quite understand why the original command was not working.. – h3ab74 Feb 4 '19 at 15:45
• Because you weren't using the link to that file, presumably. Wget will download what you tell it to, so you need to tell it to get the target of the link you want. – terdon Feb 4 '19 at 15:48

If you want to download a file, you need to use the link to that file. Your original attempt, wget https://trace.ncbi.nlm.nih.gov/Traces/sra/?run=SRR7276474 wouldn't work since that's a link to the trace page of the relevant run. If you want to download something else, just right click on the link (the one in the screenshot in your question), copy the URL and use that:
wget https://sra-download.ncbi.nlm.nih.gov/traces/sra64/SRZ/007276/SRR7276474/P1TLH.bam