# Copy changes between medium.com.txt and .medium.com.txt

http_header(user-agent): Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)

title: //meta[@property="og:title"]/@content
title: //h1
body: //article
author: //meta[@name="author"]/@content
date: //meta[@property="article:published_time"]/@content

strip: //button
# Remove low quality images
strip: //article//img[contains(@src, '?q=20') or contains(@src, 'max/34/')]
# Remove empty images (width attribute but no src attribute)
strip: //article//img[not(@src)]

# Use the high-quality copies in <noscript> elements
replace_string(<noscript>): <div class="ftr-noscript">
replace_string(</noscript>): </div>

# Only the first - h1 can appear later in an article
# e.g. https://medium.com/the-shape-of-things-to-come/facilitating-communities-of-practice-from-individual-to-ecosystem-learning-outcomes-bf7b54660b08
strip: (//h1)[1]
strip: //svg

# remove duplicate images in this form... <img><noscript><img></noscript>
# handled above, but if browser HTML is submitted, the above rules won't apply
strip: //article//img[@src]/following-sibling::*[1][self::div and @class='ftr-noscript']
# less accurate...
# strip: //article//img[@src]/following-sibling::div[@class="ftr-noscript"]

tidy: no
prune: no

test_url: https://medium.com/@savolai/kaytettavyyden-haasteet-keskustelukulttuurista-2-3-6844c0d7893b
test_contains: Jos käytettävyysongelmat ovat kerran niin tyypillisiä
test_contains: Keskustelukulttuuriongelmasta (subjective vs. objective bugs)

test_url: https://medium.com/health-the-future/thirty-things-ive-learned-482765ee3503
test_contains: Remember you will die
test_contains: You have to have some faith.

test_url: https://medium.com/@bfrancis/the-legacy-of-firefox-os-c58ec32d94f0
