Jump to content
Ketarin forum

Issues download from site with download built on Javascript


bsinnett
 Share

Recommended Posts

Hi there! Looks like I'm not the only one updating stuff. I just found this tool because I have a particularly fun (not really) website that I have to select an option in a dropdown in order to expose the download link. I'm able to see the default option, but I need to change it to get other versions.

 

It uses the normal select element, but it uses javascript to update the link. The site is https://support.freedomscientific.com/Downloads/JAWS/PreviousVersions

 

Is there a way I can change the selected option with Kuppet or some other method?

 

Any help would be appreciated!

Link to comment
Share on other sites

This is actually very common. Instead of trying to work through the problem by interacting with the site, I find it's easier to just look at the code and see what it's doing under the hood. I've actually already been doing that for years specifically with the FS website. Below is an app profile for ZoomText 2022.

<?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="dbb50eaa-d9b1-40b8-b7ef-24d6f6a49e20">
    <Category>Tools</Category>
    <WebsiteUrl />
    <UserAgent />
    <UserNotes />
    <LastFileSize>552557944</LastFileSize>
    <LastFileDate>2022-11-30T11:59:15.5802449</LastFileDate>
    <IgnoreFileInformation>false</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>schangelog</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>https://support.freedomscientific.com/Downloads/ZoomText/ZoomTextWhatsNew#latest</TextualContent>
            <Name>schangelog</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>swebsite</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>https://support.freedomscientific.com/Downloads/ZoomText</TextualContent>
            <Name>swebsite</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>snotes</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent />
            <Name>snotes</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>spc</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>zoomtext2022</TextualContent>
            <Name>spc</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>splatform</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>windows</TextualContent>
            <Name>splatform</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>sbits</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent />
            <Name>sbits</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>svendor</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>Freedom Scientific</TextualContent>
            <Name>svendor</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>/([\d\.]+)/</Regex>
            <Url>https://support.freedomscientific.com/Downloads/OfflineInstallers/GetInstallers?product=ZoomText&amp;version=16&amp;language=enu&amp;releaseType=Offline</Url>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>sdownload</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>"(http[^'"]+exe)"</Regex>
            <Url>https://support.freedomscientific.com/Downloads/OfflineInstallers/GetInstallers?product=ZoomText&amp;version=16&amp;language=enu&amp;releaseType=Offline</Url>
            <TextualContent />
            <Name>sdownload</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>LastUpdate</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>20221130T1159</TextualContent>
            <Name>LastUpdate</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>LastVersion</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>2022.2211.5.400</TextualContent>
            <Name>LastVersion</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand />
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>K:\_Ketarin\Ketarin\..\Tools\ZoomText_2022-2022.2211.5.400.exe</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2022-11-30T11:59:15.5802449</LastUpdated>
    <TargetPath>..\{category}\{appname:regexreplace:([\s\t\r\n\-\&amp;]+):_}-{version}.{url:ext}</TargetPath>
    <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
    <Name>ZoomText 2022</Name>
  </ApplicationJob>
</Jobs>

 

There are only a few things here that would need to be changed. The name of course, but if you just look through it for "ZoomText" you'll see each instance where it would need to be replaced with JAWS or jaws based on the context. 

Link to comment
Share on other sites

Thanks for that! Sorry for posting in the wrong thread. I should've poked around before posting because I ended up discovering it myself. Once I got the URL to the .js file, it was fairly straight forward from there. I just didn't fully understand what was going on at the time. Ya learn something new every day!

 

I'm sure Kuppet will be useful for other things, though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.