Jump to content
Ketarin forum

u2111

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by u2111

  1. Here's a template to keep updated Piriform portable apps, which only require app name and 7zip/7za somewhere to extract application.

    Website URL field require v1.6, else you can use this instead :

        <WebsiteUrl>http://www.piriform.com/<placeholder name="Lowercase appname" variable="appname:tolower" /></WebsiteUrl>

    It include a Guid (prototype template).*

    Globals :

    ketarin-version=1.6.0.400
    7za=..\7-Zip\7za.exe

    Template :

    <?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="dffa70a5-b3bf-4cc6-8d1c-18ee1a8790e2">
       <SourceTemplate><![CDATA[]]></SourceTemplate>
       <WebsiteUrl>http://www.piriform.com/{appname:tolower}</WebsiteUrl>
       <UserAgent>Ketarin/{ketarin-version}</UserAgent>
       <UserNotes />
       <LastFileSize>0</LastFileSize>
       <LastFileDate xsi:nil="true" />
       <IgnoreFileInformation>true</IgnoreFileInformation>
       <DownloadBeta>Default</DownloadBeta>
    
       <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
       <VariableChangeIndicator>version</VariableChangeIndicator>
       <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>Version\s+([0-9.]{2,})</Regex>
               <Url>http://www.piriform.com/{appname:tolower}/download</Url>
               <Name>version</Name>
             </UrlVariable>
           </value>
         </item>
       </Variables>
       <ExecuteCommand>pushd "{file:directory}"
    {7za} e -y "{file:filename}"
    del "{file:filename}"
    popd</ExecuteCommand>
       <ExecutePreCommand />
       <ExecuteCommandType>Batch</ExecuteCommandType>
       <ExecutePreCommandType>Batch</ExecutePreCommandType>
       <Category />
       <SourceType>FixedUrl</SourceType>
    
       <DeletePreviousFile>true</DeletePreviousFile>
       <Enabled>true</Enabled>
       <FileHippoId />
    
       <TargetPath>{root-soft}\{appname}\</TargetPath>
       <FixedDownloadUrl>http://www.piriform.com/{appname:tolower}/download/portable/downloadfile</FixedDownloadUrl>
       <Name><placeholder name="Piriform application" /></Name>
     </ApplicationJob>
    </Jobs>

    *: Any way to differentiate topic templates with and without Guid ?

  2. Hi,

     

    Can we have a new global option that allow to set and replace the default "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)" User Agent ?

    And maybe use "Ketarin/{ketarin-version}" as default User Agent (which works with the largely used SF.net and should with with most website) ?

     

    Regards,

    Alexandre

     

    Edit: and {ketarin-version} as new variable ?

  3. Thanks !

    I only tried on this app, but using "Ketarin/{ketarin-version}" with ketarin-version as 1.6.0.400 works too.

    Is there any way to set a global user agent (not using templates) ? Shouldn't Ketarin prefer this solution (if not already) ?

    There were a lot of complicated and (most of them) not working solutions, and I missed the simple user agent solution :rolleyes:.

     

    after having tried lots of configuration (url, referer, user agent)

    "Real" UserAgent like "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.47 Safari/534.13" isn't working though (that's what I tried).

     

    Edit: Tomorrow thanks too.

  4. Hi,

     

    I tried today to use (great) Ketarin to download from SourceForge using auto mirror, and after having tried lots of configuration (url, referer, user agent), I'm unable to make this work in Ketarin.

     

    If I try using wget, everything is fine :

    Pyxis% wget 'http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe?download'
    --2011-01-15 18:52:14--  http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe?download
    Resolving downloads.sf.net... 216.34.181.129
    Connecting to downloads.sf.net|216.34.181.129|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: http://downloads.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.4.2499.0_32%20bits/MPC-HomeCinema.1.4.2499.0.x86.exe?download= [following]
    --2011-01-15 18:52:15--  http://downloads.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.4.2499.0_32%20bits/MPC-HomeCinema.1.4.2499.0.x86.exe?download=
    Resolving downloads.sourceforge.net... 216.34.181.59
    Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: http://freefr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.4.2499.0_32%20bits/MPC-HomeCinema.1.4.2499.0.x86.exe [following]
    --2011-01-15 18:52:15--  http://freefr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.4.2499.0_32%20bits/MPC-HomeCinema.1.4.2499.0.x86.exe
    Resolving freefr.dl.sourceforge.net... 88.191.250.132
    Connecting to freefr.dl.sourceforge.net|88.191.250.132|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 5165571 (4.9M) [application/x-msdownload]
    Saving to: `MPC-HomeCinema.1.4.2499.0.x86.exe.1'
    
    100%[=========================================================================>] 5,165,571    873K/s   in 6.4s
    
    2011-01-15 18:52:22 (782 KB/s) - `MPC-HomeCinema.1.4.2499.0.x86.exe.1' saved [5165571/5165571]
    

     

    HTTP Headers gives all redirections :

    http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe'>http://www.webrankinfo.com/outils/header.php?url=http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe

    http://www.webrankinfo.com/outils/header.php?url=http://downloads.sourceforge.net/project/mpc-hc/MPC%2520HomeCinema%2520-%2520Win32/MPC-HC%2520v1.4.2499.0_32%2520bits/MPC-HomeCinema.1.4.2499.0.x86.exe

     

    And even in Ketarin, the file seems downloaded when I put "http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe" in a "Content URL" and the referer is set to "http://sourceforge.net" : the content that appear after a few second is "MZP" (executable header I suppose ?).

    But when updating, Ketarin says

    MPC The downloaded file is not a binary file type (text/html; charset=utf-8). Possibly there is an error page. Status code: 200 (OK) (http://downloads.sf.net/mpc-hc/MPC-HomeCinema.1.4.2499.0.x86.exe)

     

    So : what am I missing ?

    I saw that there's a new way to download from SF using credentials (though it's not documented yet), but this seems useless in this case.

     

    Any help or explanation about why it's not working ?

     

    Thanks in advance,

    Regards,

    Alexandre

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