Jump to content
Ketarin forum

[REQUEST] How to build a template for CHIP.DE?


cool400
 Share

Recommended Posts

Hi guys,

 

I wondered if it's possible to write a template for the in Germany well-known download-site CHIP.DE?

There are surely some great templates for MG or SP, but I can't download german versions there :(

 

This is an example-link to download the latest Glary Utilites 2.13: http://www.chip.de/downloads/Glary-Utilities_32044559.html

 

Maybe someone can help me with this? For example I really don't know how to use "regex" etc.

 

Best regards and thanks in advance for your help

 

cool400 :cool:

Link to comment
Share on other sites

Below is template for Glary Utils. Now test with other urls/versions, adjust regex if needed (maybe Expresso helps?), and insert placeholders. Quite simple actually. =)

 

<?xml version="1.0" encoding="utf-16"?>
<Jobs>
 <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>\>version\:.*?\>(\d+(?:\.\d+)+)\<</Regex>
           <Url>http://www.chip.de/downloads/Glary-Utilities_32044559.html</Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir1</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" .*?Zum Download")</Regex>
           <Url>http://www.chip.de/downloads/c1_downloads_auswahl_32044561.html?t=1242852147&v=3600&s=d9eb9aacd706b64cfa6a0b0a624354bb</Url>
           <Name>redir1</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir2</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?\.exe)(?:" .*?Zum Download")</Regex>
           <Url>{redir1}</Url>
           <Name>redir2</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <Category>Test</Category>
   <SourceType>FixedUrl</SourceType>
   <PreviousLocation />
   <DeletePreviousFile>false</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{redir2}</FixedDownloadUrl>
   <Name>ChipDe</Name>
 </ApplicationJob>
</Jobs>

Edited by FranciscoR
Link to comment
Share on other sites

WOW!!!!!!!!!!! This is really awesome :) Thanks a lot for your lightning-fast reply.

 

Is there a chance to modify your template to work with placeholders and various URLs (with the pop-ups) like you used in your latest Softpedia.com-template?

 

I really appreciate your good work and your precious help

 

cool400 :cool:

 

Edit: the template doesn't work :( When I open the "Variables"-window it seems that there is a problem with the download-URL.

BTW, this is the error-message I get from Ketarin: Invalid URI: the URI-string is too long. ??? And after this sentence there the source-code of the whole CHIP.DE-page...

 

I never dealed with Expresso before - seems like a hard piece of work. Do you've got any tips where to start?

Edited by cool400
Link to comment
Share on other sites

Well yeah, but i thought you wanna do it yourself ? =) Now with placeholders:

 

<?xml version="1.0" encoding="utf-16"?>
<Jobs>
 <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>\>version\:.*?\>(\d+(?:\.\d+)+)\<</Regex>
           <Url><placeholder name="Info Page URL" /></Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir1</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" .*?Zum Download")</Regex>
           <Url><placeholder name="Download URL in Info Page" /></Url>
           <Name>redir1</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir2</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" .*?Zum Download")</Regex>
           <Url>{redir1}</Url>
           <Name>redir2</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <Category>Test</Category>
   <SourceType>FixedUrl</SourceType>
   <PreviousLocation />
   <DeletePreviousFile>false</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{redir2}</FixedDownloadUrl>
   <Name>ChipDe</Name>
 </ApplicationJob>
</Jobs>

Edited by FranciscoR
Link to comment
Share on other sites

Thanks again - you were faster than me editing my posting. Maybe you can read this:

 

Edit: the template doesn't work :( When I open the "Variables"-window it seems that there is a problem with the download-URL.

BTW, this is the error-message I get from Ketarin: Invalid URI: the URI-string is too long. ??? And after this sentence there the source-code of the whole CHIP.DE-page...

 

I never dealed with Expresso before - seems like a hard piece of work. Do you've got any tips where to start?

Link to comment
Share on other sites

Ok, i found problem, but it worked fine for me when i first posted it ? =) Let me now if you get more errors. ;) To start with regex i suggest reading the Expresso tutorial also available at http://www.codeproject.com/KB/dotnet/regextutorial.aspx and if you want something more advanced, http://www.regular-expressions.info/ . And then all you need is some practice.

 

20-05-2009 23:39:48: Update started with 1 application(s)
20-05-2009 23:39:51: ChipDe: Replacing {redir1} in '{redir1}' with 'http://www.chip.de/downloads/c1_downloads_auswahl_32044561.html?t=1242858933&v=3600&s=5c868ea27a3c29a3d915d1ffca2803ca'
20-05-2009 23:39:53: ChipDe: Replacing {redir2} in '{redir2}' with 'http://www.chip.de/downloads/c1_downloads_hs_getfile_v1_32044562.html?t=1242859191&v=3600&s=d680583662c44aecdd7645251cf1fb6b'
20-05-2009 23:39:55: ChipDe: Replacing {redir3} in '{redir3}' with 'http://dl.cdn.chip.de/downloads/5220991/gusetup213.exe?1242858893-1242866393-7e284e-B-b9334f3fcff4c44df32e01cb01980d90.exe'
20-05-2009 23:39:55: ChipDe: Using referer: http://www.chip.de/downloads/Glary-Utilities_32044559.html
20-05-2009 23:39:55: ChipDe: Server source file: /downloads/5220991/gusetup213.exe
20-05-2009 23:39:57: ChipDe: Replacing {version} in '{target}\Test\ChipDe_{version}.exe' with '2.13'
20-05-2009 23:39:57: ChipDe: Determined target file name: D:\Programas\Test\ChipDe_2.13.exe
20-05-2009 23:39:57: ChipDe: Checking if update is required...
20-05-2009 23:39:57: ChipDe: Update required, 'D:\Programas\Test\ChipDe_2.13.exe' does not yet exist
20-05-2009 23:39:59: ChipDe: Replacing {version} in '{version}' with '2.13'
20-05-2009 23:39:59: Update finished

 

<?xml version="1.0" encoding="utf-16"?>
<Jobs>
 <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>\>version\:.*?\>(\d+(?:\.\d+)+)\<</Regex>
           <Url><placeholder name="Info Page URL" /></Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir1</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" (?:rel=".*?")??.*?Zum Download")</Regex>
           <Url><placeholder name="Download URL from Info Page" /></Url>
           <Name>redir1</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir2</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" .*?Zum Download")</Regex>
           <Url>{redir1}</Url>
           <Name>redir2</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>redir3</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>true</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>href="(.*?)(?:" .*?Zum Download")</Regex>
           <Url>{redir2}</Url>
           <Name>redir3</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <Category>Test</Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile>false</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{redir3}</FixedDownloadUrl>
   <Name>ChipDe</Name>
 </ApplicationJob>
</Jobs>

Link to comment
Share on other sites

This website is tricky, i would suggest starting with something more simple ? Problem is, sometimes you need 2 redir variables, other times 3. I have just tested Sophos with my first template and it works fine, but with the second doesn't work at all. Now i'm getting this message with Glary, is this a website problem ?

 

Ihr Downloadlink ist abgelaufen bitte probieren Sie es erneut.
Zurück zum Downloadbreich

Link to comment
Share on other sites

This website is tricky, i would suggest starting with something more simple?

I agree with FranciscoR completely... CHIP.DE would be quite an undertaking cool400. Lots of inconsistencies which makes for a template development nightmare. It my very well be one of those sites for which developing a 100% reliable template is unachievable. Sorry for the bad news. FranciscoR has given you a solid start. My recommendation would be to get comfortable with regex and work with that start and edit as necessary for the apps you must get from there. ;)

Link to comment
Share on other sites

Thank you very much for your try-outs...that's really some bad news :(

 

The thing is that I really like to have a download-archive like Softpedia.com, which provides mostly german applications. I'm not download from CHIP.DE very frequently, I prefer direct-downloads from the manufacturers - but I though it could be a good idea to start with an "All-In"-platform.

 

Does anyone here know an equivalent to Softpedia.com im German?

 

Best regards and thanks again for your precious help

 

cool400 :cool:

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.