body: //main/div/article[1]
body: //main

prune: no
tidy: no

# strip some standard element
strip: //header
strip: //footer
strip: //button
strip: //form
strip: //svg
strip: //nav

# strip some navigation clutter
strip_id_or_class: c-contentHeader__author
strip_id_or_class: id-Article-content-item.id-Article-advert.id-Article-advert--ad3
strip_id_or_class: dataPolicySettings__description
strip_id_or_class: additionalInfo
strip_id_or_class: contentFooter
strip_id_or_class: region--appendix
strip_id_or_class: o-box
strip_id_or_class: u-content-spacer

strip: //aside[contains(@class, 'dontPrint')]
strip: //blockquote[contains(@class, 'dontPrint')]
strip: //div[contains(@x-data, 'socialSharing')]

# special IMAGE handling to work in FTR, wallabag and FreshRSS
#

find_string: <source
replace_string: <img

strip: //picture/source[contains(@media, '47.')]
strip: //picture/img[contains(@media, '47.')]

find_string: src="data:image/gif
replace_string: foo1="data:image/gif

find_string: 480w, http
replace_string: 480w, "src="http

find_string: 640w, http
replace_string: "foo2="http

find_string: 720w, http
replace_string: "foo3="http

find_string: 960w, http
replace_string: "foo4="http

find_string: .jpg "
replace_string: .jpg"


# as this is a television and radio channel site, tidy up embedded video and audio
strip_id_or_class: hideCompletely
strip_id_or_class: c-form__button
strip_id_or_class: img.image.imageSimple.ar__content

find_string: <span aria-label="zum Video"><
replace_string: <span aria-label="zum Video">zum Video: <

find_string: <span aria-label="Audioseite"><
replace_string: <span aria-label="Audioseite">zur Audioseite: <

# show related articles as blockquote (wallabag)
replace_string(<aside): <blockquote
replace_string(</aside): </blockquote

# remove subscription adverts
strip: //a[@href='https://whatsapp.com/channel/0029VaDcqVJAu3aJgJtKhX25']/parent::aside
strip: //a[@href='https://whatsapp.com/channel/0029VaDcqVJAu3aJgJtKhX25']/parent::blockquote
strip: //div[@id='formWrapper']/parent::div

# common cleanup
strip: //main/div/article[1]//article
strip: //div[@class='self-center']/parent::div

# needed for wallabag
find_string: >Formular <
replace_string: ><
find_string: >Ende des Formulars <
replace_string: ><

wrap_in(blockquote): //figure[contains(@class, 'print:hidden')]


##############
test_url: https://www.hessenschau.de/rheinmain/index.rss
test_url: https://www.hessenschau.de/panorama/weltkriegsbombe-im-frankfurter-osthafen-entschaerft,bombenfund-frankfurt-ostend-100.html
test_url: https://www.hessenschau.de/panorama/beschaedigte-bahn-bruecke-in-frankfurt-bleibt-noch-weitere-zwei-monate-dicht-v1,bahn-bruecke-reparatur-100.html
