Skip to content

Instantly share code, notes, and snippets.

@Hypnosphi
Created March 17, 2018 16:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hypnosphi/f824a30e225c482d0d217a131906c682 to your computer and use it in GitHub Desktop.
Save Hypnosphi/f824a30e225c482d0d217a131906c682 to your computer and use it in GitHub Desktop.
!not_exists: (//article)[2]
?path: /meanwhile/.+
?path: /world/.+
?path: /music/.+
title: //h1[has-class("e2-smart-title")]
title: //div[has-class("page-title")]/h1
body: //article/div[has-class("e2-note-text")]
body: //div[has-class("narrative")]
body: //div[has-class("main")]
author: //div[has-class("menu-photo")]/next-sibling::div[has-class("menu-item")]/div[has-class("menu-link")]
author_url: //a[has-class("menu-logo")]/@href
channel: "@ilyabirman_channel"
$timestamp: //span[has-class("e2-timestamp")]
@remove: $timestamp/text()
@append(@title): $timestamp
@datetime: $timestamp
published_date: $@
<figure>: //div[has-class("e2-text-picture")]
<figure>: //div[has-class("e2-text-video")]
<figcaption>: //div[has-class("e2-text-caption")]
<slideshow>: //div[has-class("fotorama")]
$calliope: //div[has-class("e2-text-calliope-formatted")]
@wrap(<figure>): $calliope/img
# @debug
<figcaption>: $calliope/small
@append_to("./preceding-sibling::figure[1]"): $@
cover: //div[has-class("e2-note-text")]/figure[not(preceding-sibling::*)]
@remove: //div[has-class("likely-container")]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment