0

Hey I have a simple question, I want to download the following (for a bash script) with wget:

https://app.plex.tv/desktop#!/settings/server/[[long string of letters and numbers]]/status/server-dashboard

So ofcourse I typed the following command:

wget https://app.plex.tv/desktop#!/settings/server/[[long string of letters and numbers]]/status/server-dashboard

But when I press enter, it downloads "desktop", because it stops at # in the link. AKA it downloads https:///app.plex.tv/desktop. This is probably because # or ! means something for wget, so it 'breaks up' the link.

I tried surrounding the complete link with ' and " (e.g. 'https://.....dashboard' and "https://.....dashboard") but both didn't make wget download the whole link. Putting \ before # (e.g. /desktop\ #!/settings) or putting \ before ! (e.g. /desktop#\ !/settings) didn't work.

When I view the command (with nano) in my bash script, I can see that the ! in the link is green, while the rest of the link is gray. So it's deffinetely breaking the link.

How can I make sure wget downloads the whole link and doesn't stop at '#' or '!'?

thanks

Cas
  • 562
  • 1
    https://en.wikipedia.org/wiki/URI_fragment -- I don't think you can download a hashed URI fragment - this is dynamic content made by executing javascript etc – Koen Dec 16 '20 at 19:07
  • Quote anything with special characters in it – muru Dec 16 '20 at 19:07
  • 1
    see https://stackoverflow.com/questions/5901661/wget-javascript – Koen Dec 16 '20 at 19:12
  • "both didn't make wget download the whole link" ... wget downloaded whatever the server sent for that whole link. After that if it needs JavaScript or something to interpret it, that's more than wget can do. See https://askubuntu.com/questions/411540/how-to-get-wget-to-download-exact-same-web-page-html-as-browser/ for other options – muru Dec 16 '20 at 19:25
  • @Koen "dynamic content". That sounds logic. The link until .../desktop is standard. But when you go to the settings of your plex server (.../desktop#!/settings/server/[[long string of letters and numbers]]/), you make a connection to your specific plex server from their publicly available website. So the site has to dynamically change from standard site to user specific site. the long string of letters and numbers is unique for your plex server. – Cas Dec 16 '20 at 19:29

0 Answers0