here

here


~version: "2.0"
?path: /.+
!path_not: /covers
!path_not: /loves/
!path_not: /search
!path_not: /user/.+
!path_not: /jobs
!path_not: /movement

#required
body: //div[@class="article-body"]
title: //h1[@class="title"]
subtitle: //h2[@class="summary"]

#inlining from another page
$page1: $body//a[has-class("gallery-label")]/@href
@after(<iframe>): $body
@set_attr(src, $page1): $@
@inline
$pagehtml1:$@

#to show the image
<figure>: $pagehtml1//div[has-class("slide")]
@append(<figcaption>, caption, @data-caption, credit, @data-credit):$@
$caption1:$@
@append(@caption): $caption1
@append(<cite>, content,@credit):$caption1
@append(@content):$@

@remove:$pagehtml1//figure[has-class("slide") and .//div[has-class("related-galleries")]]
<slideshow>: $pagehtml1//div[@id="gallery-imgs"]
<figcaption>: $pagehtml1//h1[has-class("title")]
@append_to(//slideshow)
@before_el(//div[@data-gallery-type="Standard"]): //slideshow 

#for the other slideshow
#$page: $body//a[has-class("gallery-link")]/@href
@after(<iframe>): $body//div[@data-gallery-type="Standard"]
@set_attr(src, "./prev-sibling::div//a[has-class(\"gallery-link\")]/@href"): $@
@inline
$pagehtml:$@

#to show image
<figure>: $pagehtml//div[has-class("slide")]
@append(<figcaption>, caption, @data-caption, credit, @data-credit):$@
$caption:$@
@append(@caption): $caption
@append(<cite>, content,@credit):$caption
@append(@content):$@

@remove:$pagehtml//figure[has-class("slide") and .//div[has-class("related-galleries")]]
<slideshow>: $pagehtml//div[@id="gallery-imgs"]
<figcaption>: $pagehtml//h1[has-class("title")]
@append_to("./ancestor::html[1]//slideshow"):$@

@after_el("./ancestor::html[1]"): $pagehtml//slideshow

@remove: $pagehtml
@remove: //div[@data-gallery-type="Standard"]


#slideshow for product
<slideshow>: //div[has-class("gallery-list item-list")]

$here: //div[has-class("gallery-list-item-inner")]
<figure>: $here//div[@class="figure"]
@combine(<br>): $here//span/next-sibling::span
$cuba: //div[has-class("gallery-list-item-inner")]
@map($cuba//figure){
 $gambar: $@
 $sarikata: $gambar/next-sibling::span
 <figcaption>: $sarikata
 @append_to($gambar)
}
$here1: //div[@class="gallery-list-container item-list-container"]
@wrap_inner(<a>): //figcaption[@class="title"]
@set_attr(href, "./ancestor::a/@href"): $here1//figcaption/a

#required for article
author: //a[@class="contributor-name"]
published_date: //time/@datetime
cover: //figure[has-class("main-img")]
<figure>: //div[has-class("video-container embed-content")]
cover: //figure[has-class("video-container embed-content")]
image_url: $cover//img
<cite>: //span[has-class("credit")]

#link preview
site_name: //meta[@property="og:site_name"]/@content

@match("https:[a-z0-9\\-\\.\/]+\\.(jpe?g|png|gif) 467w"): //img[@srcset][contains(@srcset,"467w")]/@srcset
@match("https:[a-z0-9\\-\\.\/]+\\.(jpe?g|png|gif) 3x"): //img[@srcset][contains(@srcset,"3x")]/@srcset
@match("https:[a-z0-9\\-\\.\/]+\\.(jpe?g|png|gif)(?!.*\\1)"): //img[@srcset]/@srcset
@set_attr(src,@srcset): //img[not(@srcset="")]

@set_attr(src,"@data-src"): $body//img[@class="img"]

#cleaning
@remove: //div[@class="sections"]
@remove: //aside[@class="article-aside-left hidden-phone hidden-tablet"]
@remove: //time
@remove: //div[@class="contributors"]
@remove: //div[@class="pin-btn pin-hover"]

#make it better 
<div>: //a[.//img]
<div>: //a/child::img
<div>: //p[.//img]
<div>: //p[.//iframe]
<div>: //a[.//iframe]
<div>: //h1[.//img]
<div>: //h2[.//img]
<div>: //h3[.//img]
<div>: //h4[.//img]
<div>: //h5[.//img]
<div>: //h6[.//img]
<div>: //h1[.//iframe]
<div>: //h2[.//iframe]
<div>: //h3[.//iframe]
<div>: //h4[.//iframe]
<div>: //h5[.//iframe]
<div>: //h6[.//iframe]

Report Page