Cyotek Forums

Products => WebCopy => Topic started by: DegradedMind on April 03, 2019, 06:26:12 AM

Title: Trouble with the paths to images.
Post by: DegradedMind on April 03, 2019, 06:26:12 AM
So I decided to copy a small wiki, but I want such pages like "File:image.png" that are used in wikis for some reason(I don't know how wikis work) to be skipped. These pages take up space and are completely useless for me.
So this is an example of html code my specific wiki uses to show images:
<a href="/File:image.png" class="image"><img alt="image.png" src="/images/b/ba/image.png" width="666" height="666"></a>.

So I added a rule that skips "/File:" urls. These are written under the "href=" attribute. The working path is under "src=" attribute, but it's not working. The path doesn't start from the folder the html file is located. Instead of starting from the folder where the html is located ("C:/wiki.copy") so the path under the "src=" attribute would sum up with it and the result would be "C:/wiki.copy/images/b/ba/image.png", it tries to access "images/b/ba/image.png" and it's not working. My browser tries to access "images/b/ba/image.png" instead of "C:/wiki.copy/images/b/ba/image.png" What should I do? I don't know how to code and can't write a script that would fix the paths.

The website is "http://wikisound.org" by the way.
Title: Re: Trouble with the paths to images.
Post by: Richard Moss on April 07, 2019, 02:33:24 PM
Hello,

Welcome to the forums and thanks for the messages.

Thanks for posting the link to the site you were trying to copy, that is helpful. I took a quick look at the site and found one of your "file" links. The text I looked at was in Russian and the URL was Файл - did you create a rule with the Russian text or the English "file"? When viewing the source I noted that the Russian text was URL encoded to %D0%A4%D0%B0%D0%B9%D0%BB. Off the top of my head I can't remember if WebCopy  decodes the URI prior to running rules or after so you may need to create two rules.

The image paths you have quoted look like normal relative paths and so should be absolutely fine. I'll need to find a moment to try downloading part of the WikiSound site myself in order to diagnose any issues.

Regards;
Richard Moss