Diễn đàn xây dựng - Chợ xây dựng http://choxaydung.vn/forum/ |
|
Automatically Download Latest WhatsApp APK using Shell Scrip http://choxaydung.vn/forum/viewtopic.php?f=36&t=98081 |
Bạn đang xem trang 1 / 1 trang |
Người gửi: | Alaric [ Thứ 4 17/01/24 10:48 ] |
Tiêu đề bài viết: | Automatically Download Latest WhatsApp APK using Shell Scrip |
I'm trying to create a cron job that downloads the latest version of WhatsApp's APK from their website https://fmwhatdownload.pk/ using a bash script and make it available through my site. So far, I'm able to obtain the version number from the site using the following (user-agent part omitted): wget -q -O - "$@" whatsapp.com/android | grep -oP '(?<=Version )([\d.]+)' And I can download the APK using the following command: wget whatsapp.com/android/current/WhatsApp.apk That part is fine. What I can't figure out is how to download the APK only if it's newer than the existing APK on the server. How should the script be? Since I'm not a command-line pro, I guess there's a better way to achieve this than my current approach, so if you have any suggestions, I'd appreciate it very much. |
Bạn đang xem trang 1 / 1 trang | Thời gian được tính theo giờ UTC + 7 Giờ |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |