skip to Main Content

I’m trying to write a bash script for automating the installation of anydesk by wget with the help of the following code:

echo -e "[ - ] Installing AnyDesk..."
wget --max-redirect 1 --trust-server-names 'https://anydesk.com/en/downloads/thank-you?dv=deb_64' -O anydesk.deb
sudo apt install ./anydesk.deb
echo -e "[ ✔ ] AnyDesk ➜ INSTALLEDn"

The problem is that https://anydesk.com/en/downloads/thank-you?dv=deb_64 returns a HTML page, not a Debian package.

How can I parse the HTML page to find the download link to the Debian package?

2

Answers


  1. I examined page source of https://anydesk.com/en/downloads/thank-you?dv=deb_64 and download is triggered by JavaScript depending on User-Agent of browser, wget does not support JavaScript execution therefore you are actually getting HTML page source not actual .deb file. Use tool which support JavaScript execution to get actual file.

    Login or Signup to reply.
  2. You can run the following command:

    wget -O anydesk.deb https://download.anydesk.com/linux/anydesk_6.2.1-1_amd64.deb
    

    this will allow you to download Anydesk, via wget.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search