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
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.You can run the following command:
this will allow you to download Anydesk, via wget.