Log in

View Full Version : How to download mkvtoolnix with tool or code?


stax76
5th October 2020, 14:30
Is it possible to discover and download mkvtoolnix via tool like curl or via code, preferable C#/VB.NET/PowerShell or Python.

StaxRip has a new auto update feature that works with GitHub but fails on most other sites like MediaFire or fosshub.

https://github.com/staxrip/staxrip/blob/master/Forms/DownloadForm.vb

ChaosKing
5th October 2020, 15:23
Mediafire is tricky. It generates individual download links. Look how it was solved here https://github.com/gilcu3/mediafire-dl
Only mediafire Pro supports "static" download links officially.

As far as I remember fosshub also generates a dl link.
https://www.fosshub.com/faq.html#fh-tou-o1

Selur
5th October 2020, 15:27
These sites do not support direct downloads so unless you script your way and act like a browser (download page, keep cookies etc., analyse site, request next link, ...) you are out of luck.

LoRd_MuldeR
6th October 2020, 10:21
Many download websites try to block "deep" links, by including some kind of expiring session ID into the DL URL. In addition to "referer" checks, cookies, or whatnot ;)

This way, you'll have to visit the actual website and acquire a "fresh" DL URL for each download.

You may be able to automate that. Sometimes it is as simple as grabbing the actual DL URL from the HTML text via some RegEx (plus faking the "correct" referer). But, in other cases, the DL URL is obfuscated via JavaScript code.

Anyways, even if you manage to "automate" things, if tomorrow they change their website only slightly, your code probably will stop working - until you adapt it to the latest changes :rolleyes:

IMO, the best solution would be to just set up your own DL mirror(s) that are under your own control for the "auto update" feature. For distributing GPL'ed software there shouldn't be a problem about this.

stax76
6th October 2020, 11:22
It's okay that the download feature works only with GitHub. Next build automates everything that happens after the download:

The Apps dialog supports drag & drop for zip/7z files

stax76
6th October 2020, 12:19
@LoRd_MuldeR

Thanks for the PM, that will do it.