Hi Dominik, If you switch to use `archivalSAXDelegator` (in ArchivalUrlReplay.xml, import ArchivalUrlSaxReplay.xml and swap out the reference to `fastArchivalSAXDelegator` with `archivalSAXDelegator`) you can specify attributes you want to be written for different tags in ArchivalUrlSaxReplay.xml. For example, to rewrite `data-srcset` attributes in `source` tags, you would include something like:
<bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> <property name="tagName" value="SOURCE" /> <property name="modifyAttributeName" value="DATA-SRCSET" /> <property name="transformer" ref="srcsetAttributeHandler" /> </bean> I am not sure how switching to `archivalSAXDelegator` may affect performance of your OpenWayback. Alternatively, if you want to keep using `fastArchivalSAXDelegator`, via the source code available on GitHub, you could instead add in wayback-core/src/main/resources/org/archive/wayback/archivalurl/attribute-rewrite.properties the attribute that should be rewritten: *.DATA-SRCSET.type=ss Like Sawood says, "data-*" HTML attributes are custom data attributes, however, we have added rewrites for some such attributes in OpenWayback. If you would like to open a PR similar to https://github.com/iipc/openwayback/pull/382 to handle rewriting `data-srcset` attributes, it would be welcome. Lauren Ko UNT Libraries On Fri, Dec 13, 2019 at 8:47 AM Dominik Frey <[email protected]> wrote: > Hello, > > I am struggling with relative links in the data-srcset attribute, because > these links are not rewritten by open wayback and the images hence not > displayed. > > I am using open wayback 2.4.0 > > for example: > > * <picture>* > > *<source > data-srcset="/sport/mehr-sport/Sportlercollage%2C1574002596479%2Clandessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > 320w,/sport/mehr-sport/Sportlercollage%2C1574002596479%2Clandessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dS_-4026684eab220e7fb9eb2f80f316da061f3d025c.jpg > 480w" sizes="(min-width: 1900px) 371px, (min-width: 1200px) 257px, > (min-width: 768px) 188px, (min-width: 520px) 490px, 100vw" > srcset="/sport/mehr-sport/Sportlercollage%2C1574002596479%2Clandessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > 320w,/sport/mehr-sport/Sportlercollage%2C1574002596479%2Clandessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dS_-4026684eab220e7fb9eb2f80f316da061f3d025c.jpg > 480w">* > > > > *<img > data-src="http://webarchiv/openwayback/20191206090017im_/https://www.swr.de/sport/mehr-sport/Sportlercollage,1574002596479,landessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > <http://webarchiv/openwayback/20191206090017im_/https://www.swr.de/sport/mehr-sport/Sportlercollage,1574002596479,landessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg>" > data-spy="lazyload" class="rs_skip_always error" data-copyright="Foto: > Imago, picture-alliance / Reportdienste, Mike Schmidt, Jens Büttner; > Revierfoto; Sven Simon, Anke Waelischmiller/SVEN SIMON, BEAUTIFUL > SPORTS/Nils Koepke; Michael Kappeler; Borjab.Hojas;" alt="Sportlercollage > (Foto: Imago, picture-alliance / Reportdienste, Mike Schmidt, Jens Büttner; > Revierfoto; Sven Simon, Anke Waelischmiller/SVEN SIMON, BEAUTIFUL > SPORTS/Nils Koepke; Michael Kappeler; Borjab.Hojas;)" title="Foto: Imago, > picture-alliance / Reportdienste, Mike Schmidt, Jens Büttner; Revierfoto; > Sven Simon, Anke Waelischmiller/SVEN SIMON, BEAUTIFUL SPORTS/Nils Koepke; > Michael Kappeler; Borjab.Hojas;" > src="http://webarchiv/openwayback/20191206090017im_/https://www.swr.de/sport/mehr-sport/Sportlercollage,1574002596479,landessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > <http://webarchiv/openwayback/20191206090017im_/https://www.swr.de/sport/mehr-sport/Sportlercollage,1574002596479,landessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg>" > data-was-processed="true">* > > *</picture>* > > Open wayback tries to open these links via eg. http://webarchiv/ > sport/mehr-sport/Sportlercollage%2C1574002596479%2Clandessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > > However it should be > http://webarchiv/openwayback/20191210103959/https://www.swr.de/sport/mehr-sport/Sportlercollage,1574002596479,landessportlerwahl2019-rheinland-pfalz-100~_v-1x1@2dXS_-9a91314e681c924f29ec89ca45e4e12f5b1d728e.jpg > > Do you have any ideas how I could fix this issue? > > Thank you and best regards > Dominik > > > > -- > You received this message because you are subscribed to the Google Groups > "openwayback-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/openwayback-dev/c825b705-8697-468a-bd49-3882917b9577%40googlegroups.com > <https://groups.google.com/d/msgid/openwayback-dev/c825b705-8697-468a-bd49-3882917b9577%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "openwayback-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/openwayback-dev/CAL0cC6XxoHEPrkt7Vg%3DHHy2EH7hgvor3Zb%2BWAg%3D7VmSx3z6iLA%40mail.gmail.com.
