Jump to content
Ketarin forum
Kacey

Download from a redirected URL?

Recommended Posts

Hello all

I'm new to Ketarin and need to download the .zip version of Visual Studio Code.

Here is the main download page:

https://code.visualstudio.com/Download

Then I click the Windows -> .zip 64 Bit link, which has a URL like this:

https://code.visualstudio.com/docs/?dv=winzip

Also note that on that page I can check the latest version, however it leaves out the revision number ... (only shows 1.36 rather than 1.36.1)

Clicking it takes me to a page that auto-downloads the file, with a crazy URL, like this:

https://az764295.vo.msecnd.net/stable/2213894ea0415ee8c85c5eea0d0ff81ecc191529/VSCode-win32-x64-1.36.1.zip

Also, on that page is the option to "directly download" via a redirect link, like this:

https://go.microsoft.com/fwlink/?Linkid=850641

--

Being new, I'm completely lost on how I can update this? Can anyone help?

PS: What normally I do is, download the .zip, extract it to a install folder, delete some unwanted files/folders (like locale files/folders) then finally delete the downloaded .zip.

 

Share this post


Link to post
Share on other sites

Welcome to Ketarin, @Kacey. You're going to love it. :)

Ketarin can use many automatic methods to detect if a download is different, including checking the HTTP headers of the response (download URL) for the file size, file timestamp, ETag, and cache-control headers. Ketarin also intelligently (though not always perfectly) parses the download filenames from redirects and downloads. If the source site is doing things correctly, it does a hell of a job.

That said, the beauty of Ketarin is that you don't have to rely on that. If you want more details (such as the specific version number) you can use the "monitor for changes" variable to parse something specific on the source website as a version or change indicator. You can then use this information (if you want) within the download file name. If you're going to use your process above (download, extract, delete partial data, delete zip) you can automate the entire process in Ketarin. There are actually several samples of doing exactly that here on the forum.

In the specific case of this file and your stated purpose (download, extract, delete), I would use the static "go" link MS provides and hard-code the output filename to ease extraction. It's not a huge deal to use {file} instead of "vscode.zip" but if you're new it can make things a little easier.

Share this post


Link to post
Share on other sites
19 hours ago, floele said:

For discussing an app it's best to export it as XML and attach it here. Then everyone can have a look.

Hi @floele

Ok, here's a "typical" app of mine, that I use as a sort of starting template for most others.

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="81a1165e-c847-4e0d-90ec-ee3974eef525">
    <WebsiteUrl>https://remotedesktopmanager.com/release-notes</WebsiteUrl>
    <UserAgent>Mozilla</UserAgent>
    <UserNotes />
    <LastFileSize>183766297</LastFileSize>
    <LastFileDate>2019-07-23T22:37:09.2108018</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>Version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>Version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>StartEnd</VariableType>
            <Regex />
            <Url>https://remotedesktopmanager.com/home/download</Url>
            <StartText>&lt;/svg&gt;Enterprise Edition&lt;/h4&gt;
                            &lt;p class="text-center"&gt;Version </StartText>
            <EndText> | </EndText>
            <Name>Version</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand>7z x -y -mmt "{file}" -r -o"D:\Internet\Remote\Remote Desktop Manager"
rmdir /Q /S "D:\Internet\Remote\Remote Desktop Manager\de" "D:\Internet\Remote\Remote Desktop Manager\fr" "D:\Internet\Remote\Remote Desktop Manager\it" "D:\Internet\Remote\Remote Desktop Manager\nl" "D:\Internet\Remote\Remote Desktop Manager\pl" "D:\Internet\Remote\Remote Desktop Manager\ru" "D:\Internet\Remote\Remote Desktop Manager\sv" "D:\Internet\Remote\Remote Desktop Manager\tr" "D:\Internet\Remote\Remote Desktop Manager\uk" "D:\Internet\Remote\Remote Desktop Manager\zh-CHS" "D:\Internet\Remote\Remote Desktop Manager\zh-TW" "D:\Internet\Remote\Remote Desktop Manager\OpenSource"
del "D:\Internet\Remote\Remote Desktop Manager\Software License Agreement.pdf" "D:\Internet\Remote\Remote Desktop Manager\Readme.RemoteDesktopManager.htm" "D:\Internet\Remote\Remote Desktop Manager\Welcome.RemoteDesktopManager.Fr.htm"
del /q /f "{file}"</ExecuteCommand>
    <ExecutePreCommand>del /q /f "D:\Internet\Remote\Remote Desktop Manager\*.dll" "D:\Internet\Remote\Remote Desktop Manager\*.exe" "D:\Internet\Remote\Remote Desktop Manager\*.ocx"</ExecutePreCommand>
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Remote</Category>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>D:\Internet\Remote\Remote Desktop Manager\Devolutions.RemoteDesktopManager.Bin.2019.1.39.0.zip</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2019-07-23T22:37:09.2108018</LastUpdated>
    <TargetPath>D:\Internet\Remote\Remote Desktop Manager\</TargetPath>
    <FixedDownloadUrl>https://cdn.devolutions.net/download/Devolutions.RemoteDesktopManager.Bin.{Version}.zip</FixedDownloadUrl>
    <Name>Remote Desktop Manager</Name>
  </ApplicationJob>
</Jobs>

 

Here's (the first version with the download URL that has hashes in it) what I have so far for VSCode:

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="158d8fcf-d46e-4a48-ba90-333aa1853d2f">
    <WebsiteUrl>https://code.visualstudio.com</WebsiteUrl>
    <UserAgent />
    <UserNotes>The download URL has hashes in it; i couldnt find a dl url w/out them, so this may stop working after this particular VSCode version if the hashes change per version.</UserNotes>
    <LastFileSize>76699167</LastFileSize>
    <LastFileDate>2019-07-18T12:25:57.1242246</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>Version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>Version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>StartEnd</VariableType>
            <Regex />
            <Url>https://www.softpedia.com/get/PORTABLE-SOFTWARE/Programming/Visual-Studio-Code-Portable.shtml</Url>
            <StartText>&lt;title&gt;Download Visual Studio Code Portable </StartText>
            <EndText>&lt;/title&gt;</EndText>
            <Name>Version</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand>7z x -y -mmt "{file}" -r -o"G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode"
rmdir /Q /S "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\licenses"
copy "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\en-US.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK"
del "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\*.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\LICENSES.chromium.html" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\LICENSE.rtf" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\ThirdPartyNotices.txt"
copy "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\en-US.pak"
del /q /f "{file}" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK"</ExecuteCommand>
    <ExecutePreCommand>del /q /f G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.dll" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.exe" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.bin"</ExecutePreCommand>
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Development</Category>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\VSCode-win32-x64-1.36.1.zip</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2019-07-18T12:25:57.1242246</LastUpdated>
    <TargetPath>G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\</TargetPath>
    <FixedDownloadUrl>https://softpedia-secure-download.com/dl/79c582ab4299f5326926e66c7496f4ff/5d30a4d2/100253845/software/portable/programming/VSCode-win32-x64-{Version}.zip</FixedDownloadUrl>
    <Name>VSCode</Name>
  </ApplicationJob>
</Jobs>

 

And here's the other version for vscode, that uses the redirecting link:

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="89231ac9-2793-40cb-a5eb-31340592506d">
    <WebsiteUrl>https://code.visualstudio.com/updates</WebsiteUrl>
    <UserAgent />
    <UserNotes />
    <LastFileSize>76699167</LastFileSize>
    <LastFileDate>2019-07-18T12:25:57.1242246</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>StartEnd</VariableType>
            <Regex />
            <Url>https://code.visualstudio.com/docs/?dv=winzip</Url>
            <StartText>&lt;span itemprop="softwareVersion"&gt;</StartText>
            <EndText>&lt;/span&gt;</EndText>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand>7z x -y -mmt "{file}" -r -o"G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode"
rmdir /Q /S "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\licenses"
copy "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\en-US.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK"
del "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\*.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\LICENSES.chromium.html" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\LICENSE.rtf" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\resources\app\ThirdPartyNotices.txt"
copy "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\locales\en-US.pak"
del /q /f "{file}" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\en-US.pak.BAK"</ExecuteCommand>
    <ExecutePreCommand>del /q /f "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.dll" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.exe" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.pak" "G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\*.bin"</ExecutePreCommand>
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Development</Category>
    <SourceType>FixedUrl</SourceType>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2019-07-18T12:25:57.1242246</LastUpdated>
    <TargetPath>G:\FileMenuTools\App\FileMenu Tools\My Custom Additions\Editors\VSCode\</TargetPath>
    <FixedDownloadUrl>https://go.microsoft.com/fwlink/?Linkid=850641</FixedDownloadUrl>
    <Name>VSCode (Test)</Name>
  </ApplicationJob>
</Jobs>

 

Share this post


Link to post
Share on other sites

I just had another program with a redirect that I can't get working: MKVToolNix (hosted on FossHub):

When I do a Check for Update, I get the error:

Quote

The downloaded file is not a binary file type (text/html). Possibly there is an error page. Status code: 200 (OK) (https://www.fosshub.com/MKVToolNix.html?dwl=mkvtoolnix-64-bit-35.0.0.7z)

Here's my XML for it so far:

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="4eb194ef-022c-4f26-9f6e-c65f1d7f8632">
    <WebsiteUrl>https://www.fosshub.com/MKVToolNix.html</WebsiteUrl>
    <UserAgent>{UserAgent-64}</UserAgent>
    <UserNotes />
    <LastFileSize>63148828</LastFileSize>
    <LastFileDate>2019-07-24T02:27:37.493154</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Avoid</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>StartEnd</VariableType>
            <Regex />
            <Url>https://www.fosshub.com/MKVToolNix.html</Url>
            <StartText>&lt;dd itemprop="softwareVersion"&gt;</StartText>
            <EndText>&lt;/dd&gt;</EndText>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand>7z x -y -mmt "{file}" -r -o"{startuppath}{category}"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ca"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\de"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\es"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ja"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ko"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\licenses"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\nl"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\pl"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\uk"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\zh_CN"
del "{startuppath}{category}\{appname}\doc\copying.txt"
del "{startuppath}{category}\{appname}\doc\news.txt"
del "{startuppath}{category}\{appname}\doc\readme.txt"
copy "{startuppath}{category}\{appname}\locale\libqt\qt_en.qm" "{startuppath}{category}\{appname}\qt_en.qm"
rmdir /Q /S "{startuppath}{category}\{appname}\locale"
copy "{startuppath}{category}\{appname}\qt_en.qm" "{startuppath}{category}\{appname}\locale\libqt\qt_en.qm"
del "{startuppath}{category}\{appname}\qt_en.qm"
del /q /f "{file}"</ExecuteCommand>
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Video Utilities</Category>
    <SourceType>FixedUrl</SourceType>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2019-07-24T02:27:37.493154</LastUpdated>
    <TargetPath>{startuppath}{category}\{appname}\</TargetPath>
    <FixedDownloadUrl>https://www.fosshub.com/MKVToolNix.html?dwl=mkvtoolnix-64-bit-{version}.7z</FixedDownloadUrl>
    <Name>MKVToolnix</Name>
  </ApplicationJob>
</Jobs>

 

Share this post


Link to post
Share on other sites

FOSSHub is a little more complicated. Here you need the right referer and the right POST data to tell the site which file you want to download. You can analyze the network traffic for example with Firefox (start the page with Firefox and use CTRL+SHIFT+E to call the network analysis tools). Click on one of the download links and as you can see on the screenshot you can trace which POST parameters need to be passed. The POST parameters can be found in the source code of the page (import the XML file, then you will know what I mean). By analyzing the network you know which parameters to pass. So we now also know which parameters we need from the source code of the page :) 

mkvtoolnix2qkkg.jpg

 

Converted to your directory structure it will look like this for MKVToolNix (just save it as XML and import it into Ketarin):

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="4eb194ef-022c-4f26-9f6e-c65f1d7f8632">
    <Category>Video Utilities</Category>
    <WebsiteUrl>https://www.fosshub.com/MKVToolNix.html</WebsiteUrl>
    <UserAgent>{UserAgent-64}</UserAgent>
    <UserNotes />
    <LastFileSize>63148828</LastFileSize>
    <LastFileDate>2019-07-24T02:27:37.493154</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Avoid</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>softwareVersion.*?([\d\.{1,}]+)</Regex>
            <Url>{appdlpage}</Url>
            <StartText>&lt;dd itemprop="softwareVersion"&gt;</StartText>
            <EndText>&lt;/dd&gt;</EndText>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>referer</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>https://www.fosshub.com/MKVToolNix.html</TextualContent>
            <Name>referer</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>appdlpage</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <Url />
            <TextualContent>https://www.fosshub.com/MKVToolNix.html</TextualContent>
            <Name>appdlpage</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>filename</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>"n":"(.+?)"</Regex>
            <Url>{appdlpage}</Url>
            <Name>filename</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>islatestversion</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>true</TextualContent>
            <Name>islatestversion</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>projectid</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>"projectId":"(.+?)"</Regex>
            <Url>{appdlpage}</Url>
            <Name>projectid</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>projecturi</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>"u":"(.+?)"</Regex>
            <Url>{appdlpage}</Url>
            <Name>projecturi</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>releaseid</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>"r":"(.+?)"</Regex>
            <Url>{appdlpage}</Url>
            <Name>releaseid</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>url</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>{download}</TextualContent>
            <Name>url</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>download</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>(https[^"]*)"</Regex>
            <PostData>projectId=%7bprojectid%7d&amp;releaseId=%7breleaseid%7d&amp;projectUri=%7bprojecturi%7d&amp;fileName=%7bfilename%7d&amp;isLatestVersion=%7bislatestversion%7d</PostData>
            <Url>https://api.fosshub.com/download/</Url>
            <Name>download</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand>7z x -y -mmt "{file}" -r -o"{startuppath}{category}"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ca"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\de"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\es"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ja"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\ko"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\licenses"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\nl"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\pl"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\uk"
rmdir /Q /S "{startuppath}{category}\{appname}\doc\zh_CN"
del "{startuppath}{category}\{appname}\doc\copying.txt"
del "{startuppath}{category}\{appname}\doc\news.txt"
del "{startuppath}{category}\{appname}\doc\readme.txt"
copy "{startuppath}{category}\{appname}\locale\libqt\qt_en.qm" "{startuppath}{category}\{appname}\qt_en.qm"
rmdir /Q /S "{startuppath}{category}\{appname}\locale"
copy "{startuppath}{category}\{appname}\qt_en.qm" "{startuppath}{category}\{appname}\locale\libqt\qt_en.qm"
del "{startuppath}{category}\{appname}\qt_en.qm"
del /q /f "{file}"</ExecuteCommand>
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation />
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2019-07-24T02:27:37.493154</LastUpdated>
    <TargetPath>{startuppath}{category}\{appname}\</TargetPath>
    <FixedDownloadUrl>{url}</FixedDownloadUrl>
    <Name>MKVToolnix</Name>
  </ApplicationJob>
</Jobs>

 

As already written, the data that the browser (or Ketarin) should transmit to the download page (POST fields) is important here.

Another working example is mp3DirectCut or Audacity.

MKVToolNix.xml

Edited by necrox
forgot the screenshot

Share this post


Link to post
Share on other sites

For VSCode you also have to take look at the network traffic (start the page e.g. with Firefox and use CTRL+SHIFT+E to call the network analysis tools). Click on one of the download links to see that Microsoft points to the following unchanged paths for Windows downloads. So if you follow the links on the download page a bit, take a look at the referers and especially the answers of the requested addresses, you can quickly see that Microsoft refers to fixed addresses. I would guess that the following links will always refer to the current, stable version of the respective installer/archive for a long time ;)

vscodepsj8w.jpg

 

 

.ZIP ARCHIVE:

32-bit: https://vscode-update.azurewebsites.net/latest/win32-archive/stable

64-bit: https://vscode-update.azurewebsites.net/latest/win32-x64-archive/stable

alternative (you need the referer):

Download link: https://aka.ms/win32-archive-stable

With the following referer: https://code.visualstudio.com/docs/?dv=win32zip

Download link: https://aka.ms/win32-x64-archive-stable

With the following referer: https://code.visualstudio.com/docs/?dv=winzip

 

USER INSTALLER:

32-bit: https://vscode-update.azurewebsites.net/latest/win32-user/stable

64-bit: https://vscode-update.azurewebsites.net/latest/win32-x64-user/stable

alternative (you need the referer):

Download link: https://aka.ms/win32-user-stable

With the following referer: https://code.visualstudio.com/docs/?dv=win32user

Download link: https://aka.ms/win32-x64-user-stable

With the following referer: https://code.visualstudio.com/docs/?dv=win64user

 

SYSTEM INSTALLER:

32-bit: https://vscode-update.azurewebsites.net/latest/win32/stable

64-bit: https://vscode-update.azurewebsites.net/latest/win32-x64/stable

alternative (you need the referer):

Download link: https://aka.ms/win32-stable

With the following referer: https://code.visualstudio.com/docs/?dv=win32

Download link: https://aka.ms/win32-x64-stable

With the following referer: https://code.visualstudio.com/docs/?dv=win64

 

Edited by necrox
forgot the screenshot

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.