Muhammad Habib
Muhammad Habib

Reputation: 11

Anydesk installation by bash script using wget

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 ➜ INSTALLED\n"

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?

Upvotes: 1

Views: 569

Answers (3)

Zodiac
Zodiac

Reputation: 1

wget http://ftp.de.debian.org/debian/pool/main/g/gtkglext/libgtkglext1_1.2.0-11_amd64.deb
sudo dpkg -i libgtkglext1_1.2.0–11_amd64.deb

Then install anydesk:

sudo dpkg -i anydesk_6.3.0–1_amd64.deb

then reboot

Upvotes: 0

user20947816
user20947816

Reputation:

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.

Upvotes: 0

Daweo
Daweo

Reputation: 36650

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.

Upvotes: 1

Related Questions