Author Topic: copys but will not show  (Read 149 times)

Offline kermets

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
copys but will not show
« on: February 03, 2020, 08:21:19 AM »
Hi, webcopy did copy a online calculator that i wanted to used off line
But when tring to run offline the correct image flashs up then disappears

URL i want to copy below and URL message after tring to open

https://rcplanes.online/cg_canard.htm

file:///C:/Downloaded%20Web%20Sites/rcplanes.online/Canard%20Center%20of%20Gravity%20Calculator_files/illegalcopy.htm

is there something I can change to fix this
cheers Brett


Offline Richard Moss

  • Cyotek Team
  • Administrator
  • Sr. Member
  • *****
  • Posts: 350
  • Karma: +17/-0
    • cyotek.com
Re: copys but will not show
« Reply #1 on: February 05, 2020, 06:10:16 PM »
Hello,

I took a look at the page you mentioned. It has some rudimentary client side JavaScript in it that checks the current host and if it doesn't match one of a number of domains it tries to redirect to another page. As the other page (illegalcopy.htm) doesn't appear to be linked anywhere else except in this JavaScript, WebCopy doesn't know about it and hasn't copied it which is why the browser presents an error page.

Current versions of WebCopy don't have the ability to remove content from the HTML so this is something you'd have to resolve yourself.

If you open up the cg_canard.htm file download by WebCopy and scroll to the bottom of the file you'll see this block:

Code: [Select]
<script>
if ((document.URL.indexOf("https://www.rcplanes.online/") != 0) &&
(document.URL.indexOf("https://rcplanes.online/") != 0) &&
(document.URL.indexOf("http://rcplanes.online/") != 0) &&
(document.URL.indexOf("https://rc-model-aircraft.com/") != 0) &&
(document.URL.indexOf("http://rc-model-aircraft.com/") != 0))
{location.replace("Canard%20Center%20of%20Gravity%20Calculator_files/illegalcopy.htm");}   
</script>

Delete it and the page will work correctly (although it isn't laid out perfectly which I find curious, I'll look further into that when I have time)

Not that I checked a sample of other pages and this JavaScript block was present in all of them so you would need to repeat the above steps for any other pages you wish to be available offline.

Regards;
Richard Moss

Offline kermets

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: copys but will not show
« Reply #2 on: February 07, 2020, 06:35:09 AM »
Thanks Richard for your amazing reply with detail,

I edit the page and at least I have my offline calculator working......

then I did try another program that saved in html format and when i edit the location line deleting all in the braces as above it seem to work
the program did save some extra file .js and .css files
it was httrack, wonder if webcopy can save those extra files?

cheers again
Brett

Offline Richard Moss

  • Cyotek Team
  • Administrator
  • Sr. Member
  • *****
  • Posts: 350
  • Karma: +17/-0
    • cyotek.com
Re: copys but will not show
« Reply #3 on: February 10, 2020, 04:44:39 PM »
Hello,

Thanks for the follow up. You mentioned HT Track included extra files, can you provide examples of the names of the files that are missing?

WebCopy won't download the illegalcopy.htm file because it can't find it as it is defined in JavaScript. You can tell it to include it though by adding it to a list of additional URL's to copy as found in the Project Properties dialog. However, if you can let me know the names of specific files I can look into this further in case there's a bug.

There's also a links page which WebCopy wasn't able to copy, but that page doesn't load one the server so that is to be expected.

Regards;
Richard Moss

Offline kermets

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: copys but will not show
« Reply #4 on: February 12, 2020, 01:13:24 AM »
Hi Richard......sorry my mistake it is the other way around

webcopy creates more files and more folders

Platform.js is one extra file

HTTrack.jpg
*HTTrack.jpg (241.4 kB . 1247x882 - viewed 29 times)

webcopy.jpg
*webcopy.jpg (297.95 kB . 1572x890 - viewed 32 times)

 

anything