appyface Posted March 27, 2017 Report Share Posted March 27, 2017 Trying to get the Windows Setup package from this page: http://www.freefilesync.org/download.php When I download the file with web browser, this is what I see: GET http://www.freefilesync.org/download/FreeFileSync_8.10_Windows_Setup.exe[HTTP/1.1 302 Moved Temporarily 187ms] GET http://www.mediafire.com/file/bw49xxy2n4i9fhr/FreeFileSync_8.10_Windows_Setup.exe[HTTP/1.1 302 Found 250ms] GET http://download1259.mediafire.com/5qcrsrmlm45g/bw49xxy2n4i9fhr/FreeFileSync_8.10_Windows_Setup.exe[HTTP/1.1 200 OK 15079ms] Is there a way to capture the moved URL with Ketarin to download it? Link to comment Share on other sites More sharing options...
necrox Posted March 27, 2017 Report Share Posted March 27, 2017 This is a referer/redirection problem.You need to set a referer for this download, which is the download link itself. variable: download Content from url: http://www.freefilesync.org/download.php Use regular expression: ([^"]*Setup.exe) Set {referer} as referer for your download: variable: referer Textual content: http://www.freefilesync.org/download.php In case you need the version number: variable: version Content from url: http://www.freefilesync.org/download.php Use regular expression: (?<=Changelog.*?FreeFileSync )[0-9.]{2,} And the final download link: variable: url Textual content: http://www.freefilesync.org/{download} Link to comment Share on other sites More sharing options...
appyface Posted March 27, 2017 Author Report Share Posted March 27, 2017 Thank you for the very detailed reply, necrox! I will give it a go. Can you offer any step by step, or at least some tips and hints, on how you worked this out, for n00bie :-) I thought it might be something like this, but examining the page it didn't suggest to me. N00bie... Thank you for any education if you have time. Link to comment Share on other sites More sharing options...
necrox Posted March 29, 2017 Report Share Posted March 29, 2017 It seems that the FreeFileSync guys have changed the download behavior. You still need a referer, but as opposed to earlier, you now have to use the download page itself as a referer. So the new referer is now http://www.freefilesync.org/download.php instead of http://www.freefilesync.org/download.php?{download} The funny thing is that both work flawlessly. Nevertheless, I have edited the above post. Back to your last request: The Network Monitor from the Web Developer Tools in Mozilla Firefox are quite useful for this. Here is a short video of how to find out the referer for FreeFileSync. I hope the quality is good enough. :-) Some references: Mozilla Firefox Web Developer Tools Network MonitorNetwork Monitor - Network request details Common Shortcuts Developer Tools Shortcuts Link to comment Share on other sites More sharing options...
appyface Posted March 29, 2017 Author Report Share Posted March 29, 2017 Thank you so much necrox. I have used the Web Console (that's how I find the 'get' request information showing the 302 file moved info), but I have never used the Network Monitor tool. The quick video tutorial you made is perfect, and I look forward to peering further into that tool. BTW. I *thought* I followed your (first) instructions to a "T" because it worked great! Ha. I went back just now to change the referer per your recommendation above, and saw I never populated it. So I downloaded the file successfully without a referer! That doesn't seem like it should have worked. Maybe because I had already been downloading from the site via web browser and it was cached? (Not sure what Ketarin shares with the system or default browser.) Since I delete the garbage out of the browsers frequently, chances are next time there is an update Ketarin will try to download when browsers are clean and I haven't visited the page. If it fails I'll populate the referer as above and try again. Thank you again for your time and effort not only to solve this one but to help me learn to help myself. Give a man fish, he eats for a day; teach a man to fish and he'll eat for as long as the same kind of bait works :-) I'm always in the market to learn new Ketarin bait. Kind regards. Link to comment Share on other sites More sharing options...
necrox Posted March 29, 2017 Report Share Posted March 29, 2017 You're welcome! The tools I use most often from the Web Developer Tools are the console, the debugger and the network analysis tool. You don't really need a defined referrer variable as shown in the example above. I have some templates using that variable for a specific groups of apps. That's the reason there is one for FreeFileSync :-) You can also use global referrers. As an example: for downloads from Sourceforge.net I have specified the global variable {sf} with the value https://sourceforge.net. Link to comment Share on other sites More sharing options...
Ambimind Posted March 30, 2017 Report Share Posted March 30, 2017 Trying to get the Windows Setup package from this page: http://www.freefilesync.org/download.php When I download the file with web browser, this is what I see: GET http://www.freefilesync.org/download/FreeFileSync_8.10_Windows_Setup.exe [HTTP/1.1 302 Moved Temporarily 187ms] GET http://www.mediafire.com/file/bw49xxy2n4i9fhr/FreeFileSync_8.10_Windows_Setup.exe [HTTP/1.1 302 Found 250ms] GET http://download1259.mediafire.com/5qcrsrmlm45g/bw49xxy2n4i9fhr/FreeFileSync_8.10_Windows_Setup.exe [HTTP/1.1 200 OK 15079ms] Is there a way to capture the moved URL with Ketarin to download it? I've attached a working job file which you can import into Ketarin(1.8.7) : File > Import. You will notice that no special settings are required to get it working. I believe Ketarin can handle simple file redirects of this kind without issue; however problems do arise when one is redirected to a website which requires running of javascript to generate the url. Please note that you must change the download directory according to your setup. Edit : On the next day the job stopped working, I've made the required changes and re-uploaded. FreeFileSync.xml Link to comment Share on other sites More sharing options...
appyface Posted March 30, 2017 Author Report Share Posted March 30, 2017 I'll give your way a try too, thank you Ambimind! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now