Help copying a responsive Page

Started by dantzu, November 02, 2023, 10:26:51 AM

Previous topic - Next topic

dantzu

I'm trying to copy a bunch of pages created with adobe express. I'm having trouble getting the full image resolution in the local copies. I only get images with max 1024px. Even though upon inspecting the page, I can see that images are served or at least are available in 2560px

(see screenshot here: https://pasteboard.co/OUmklCOvJ8BZ.jpg ).

Adding the custom attribute "//img/@data-original" to the WebCopy projekt didn't solve it.

How can I get the max resolution on the page? Any help would be much appreciated. Here's an example URL:

https://express.adobe.com/page/7Gwsq6GSTd8bl/


Richard Moss

Hello,

I had a look at the website and the image URLs actually have a size parameter that defaults to 1024. When viewing the page source, it was 1024, but when looking at the DOM in the browser it was 2056 - which happens to be the width of my primary monitor. I haven't looked further but it would seem clear that some JavaScript is being used to manipulate the style URLs.

So from that perspective, WebCopy is doing exactly as it should - the HTML specifies a size of 1024 and thus that is what it downloads.

However, if you want to try to mimic this aspect of the JavaScript behaviour (a reminder, if needed, that WebCopy doesn't execute the JavaScript) - WebCopy has a "Transform URLs" feature that will take a given URL and replace part of it.

I tried adding a transform (Project Properties | Advanced | URL Transforms) with the following attributes which seemed to do the trick - just set the new size as appropriate.

  • Expression: &size=(\d+)
  • Replacement: &size=2056

You can learn more about transforming URLs at the following documentation link: https://docs.cyotek.com/cyowcopy/current/uritransforms.html

Edit: There doesn't seem to be a need for the data-original attribute rule as this does not exist in the original source, of this page at least.

Regards;
Richard Moss
Read "Before You Post" before posting (https://forums.cyotek.com/cyotek-webcopy/before-you-post/). Do not send me private messages. Do not expect instant replies.

All responses are hand crafted. No AI involved. Possibly no I either.