Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### VIDEO EMBEDS ###
- $video: $body//a[@data-label="video" and @data-action="open"]/../..
- @set_attr(class, "include-video"): $video
- $video: $body//*[has-class("include-video")]
- @set_attr(poster, "./self::a/img/@src"): $video//a
- @set_attrs(src, @data-lbx-id, data-type, "inline-video"): $video//a
- @replace("(\\d+)", "/videos/embed,$1.html"): $video//a/@src
- <iframe>: $video//a[@src]
- <figcaption>: $video//*[has-class("bu")]
- <figure>: $video
- @inline: $body//iframe[@data-type="inline-video"]
- $frame: $@
- @remove: $frame//head
- @remove: $frame//body/*[not(./self::script[contains(.,"file")])]
- $frame: $frame//script
- @match("\"sources\":([^\\]]+\\])", 1)
- @json_to_xml: $frame
- $frame: $@
- @set_attr(src, .//item[count(./default)=1]/file): $frame
- @remove: $frame/*
- <video>: $frame
- ### /VIDEO EMBEDS ###
Add Comment
Please, Sign In to add comment