T
Size: a a a
T
w
w
T
T
~version: "2.1"
channel: "@p0dcasts"
# Apply template only for articles
?exists: //meta[@property="og:type"][@content="article"]
!path_not: (/(\?.*|index\.php(\?.*)?)?)?$
$main: //*[has-class("wpb_wrapper")]
body: $main//*[has-class("post_content")]
title: $main//h1
@json_to_xml: //script[@data-type = "application/ld+json"]
$published_date: //uploadDate
$published_date?: //datePublished
@remove: //xml
author: $main//a[has-class("post-author-name")]
author_url: $author/@href
published_date: $published_date
cover: $main//*[has-class("post_image")]/img
# ELEMENTS
@after(<br>): //blockquote/p
@set_attr(srcset, @data-srcset): //img
# EMBEDS
# Flourish Embed
<iframe>: //*[has-class("flourish-embed")]
@set_attr(src, "https://public.flourish.studio/", @data-src, "\\/embed"): $@
# Icons
<pic>: //img[(number(@width)) < 65]
# Big images in link
@if( "//a[descendant::img][ends-with(@href, \".jpeg\") or ends-with(@href, \".jpg\") or ends-with(@href, \".png\") or ends-with(@href, \".gif\") or ends-with(@href, \".JPEG\") or ends-with(@href, \".JPG\") or ends-with(@href, \".PNG\") or ends-with(@href, \".GIF\")]" ) {
@set_attr(src, "./..//self::a/@href"): //a[not(@href = //link[@rel="canonical"]/@href) and not(@href = //meta[@property="og:url"]/@content)]//img
}
# Instagram as <blockquote>
@set_attr(src, @data-instgrm-permalink): //blockquote[has-class("instagram-media")]
<iframe>: $$
# HANDLERS
# Remove unwanted elements
?true
@remove: //button
@remove: //script
@remove: //xml
@remove: //img[ends-with(@src, ".svg")]
@remove: //img[starts-with(@src, "data:image")]
@remove: //pic[ends-with(@src, ".svg")]
@remove: //noscript
# Error Handler EMBED_ELEMENT_NOT_SUPPORTED
<unsupported>: //body[has-class("t-body")] # Tilda sites not supported
<unsupported>: $body//*[text()[contains(., "$latex")]]
<unsupported>: $body//div[has-class("apester-media")]
<unsupported>: $body//div[has-class("issuuembed")]
<unsupported>: $body//div[has-class("juxtapose")]
<unsupported>: $body//div[has-class("piktowrapper-embed")]
<unsupported>: $body//div[has-class("playbuzz")]
<unsupported>: $body//div[has-class("scrbbl-embed")]
<unsupported>: $body//div[has-class("quizz-container")]
<unsupported>: $body//div[starts-with(@class, "wtf-broadcast")]
<unsupported>: $body//div[has-class("articlevideo") and not(@data-type="instagram")]
<unsupported>: $body//script[contains(., "apester.") or contains(@src, "apester.")]
<unsupported>: $body//script[contains(., "playbuzz.") or contains(@src, "playbuzz.")]
<unsupported>: $body//script[contains(@src, "leaflet")]
<unsupported>: $body//script[contains(text(), "opinionstage")]
@unsupported: $body//unsupported
# Error Handler NESTED_ELEMENT_NOT_SUPPORTED
$problems: $body
@while( $problems ) {
$test: $body//*[self::*[has-class("fb-post")] or self::blockquote or self::aside or self::figure or self::img[not(./ancestor::figure)] or self::iframe[not(./ancestor::figure)] or self::script[@data-telegram-post] or self::slideshow[not(./ancestor::figure)] or self::video[not(./ancestor::figure)] or self::audio[not(./ancestor::figure)] or self::related or self::footer or self::table[not(ancestor::table) and not(descendant::table)]]
$problems: $test/self::*[ancestor::anchor or ancestor::blockquote[not(contains(@class,"instagram"))] or ancestor::aside or ancestor::footer or ancestor::strong or ancestor::b or ancestor::em or ancestor::i or ancestor::ins or ancestor::u or ancestor::del or ancestor::s or ancestor::strike or ancestor::code or ancestor::kbd or ancestor::samp or ancestor::tt or ancestor::mark or ancestor::sup or ancestor::pic or ancestor::sub or ancestor::a or ancestor::reference or ancestor::h1 or ancestor::h2 or ancestor::h3 or ancestor::h4 or ancestor::h5 or ancestor::h6 or ancestor::p or ancestor::pre or ancestor::hr or ancestor::img or ancestor::br or ancestor::ul or ancestor::ol or ancestor::li]
@split_parent: $problems
}
T
w
reloadOriginal
.w
\u200B
\u2063
\u00A0
KG
reloadOriginal
.w
T
\u200B
\u2063
\u00A0
w
w
KG
T
w
T
T