AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
138 stars 27 forks source link

`xml-prune` does not work on serially.it #398

Closed Alex-302 closed 6 months ago

Alex-302 commented 6 months ago

AdGuard syntax - doesn't work in AdGuard serially.it#%#//scriptlet('xml-prune', 'xpath(//*[name()="Period"][.//*[name()="BaseURL" and contains(text()\,"/ad/")]])', '', '.mpd')

Ublock syntax - works in uBO serially.it##+js(xml-prune, xpath(//*[name()="Period"][.//*[name()="BaseURL" and contains(text()\,'/ad/')]]), , .mpd)

Checked in Chrome. AdGuard 4.2.241 URL: https://www.serially.it/play/b2d953bc-b9df-4bed-a7b1-e3436be8bbdd_AEBE0Fc?t=0

Need Italian IP. The moment when to watch advertising can be determined by the marks on the progress bar, then with the ad blocker rewind to ad time minus a few seconds.

AdamWr commented 6 months ago

It seems that it works correctly if , in text()\," is not escaped:

serially.it#%#//scriptlet('xml-prune', 'xpath(//*[name()="Period"][.//*[name()="BaseURL" and contains(text(),"/ad/")]])', '', '.mpd')
Alex-302 commented 6 months ago

Yep. Thanks.