Closed oliverweinm closed 4 years ago
Hey! I think we could add a URL text search looking for the first 'MEGA X version' match should be able to pull out that version: (April 2020) MEGA X version 10.1.8 build 10200331
This URL might also work well:
https://www.megasoftware.net/releases/MEGAX_10.1.8_installer.pkg
Hey @rustymyers thanks for the quick response. That would be a totally valid approach here.
When I come across a situation like this, I usually like to create a a python script (in an override repo I help maintain) for a new processor which uses a regex to fetch the current version from a webpage, formats a correct download string (this part can be really ugly in some download links) and returns it for the URLDownloader to use.
In fact, I already wrote one for this specific repo.
How about I make a pull request and you take a look at it and see if you like the changes I made?
Sure, sounds good. Thanks!
Hi @rustymyers I don't want to leave you waiting for long, however the webpage of the developer megasoftware.net is currently down (problem with the DNS server) and prevents me from testing my code before I can make the pull request. (I've already written to the developer about this)
Hey @rustymyers Just made the pull request: https://github.com/autopkg/hansen-m-recipes/pull/174
Resolved in latest pull request #174
The link currently used (_https://www.megasoftware.net/releases/MEGA7.0.21_mac32_setup.dmg_) in the recipe com.github.hansen-m.download.mega is hardcoded and only downloads MEGA version 7.0.21
This version is outdated and is not supported on macOS Catalina and higher, which can only run 64-bit programs now.
A python script which would scrape this page for the latest update to MEGA: https://www.megasoftware.net/history, create a download link in this format: _https://www.megasoftware.net/do_force_download/MEGAX_xx.x.x_installer.pkg_ and return it to the URLDownloader processor in the Mega.download.recipe can keep the recipe up to date, without having to change the download link for every new version.