title: //h1

# We can have multiple authors
author: //a[@class='auteur']

# Last edition date (if any)
date: //time[@itemprop='dateModified']/@datetime
# Publication date
date: //time[@itemprop='datePublished']/@datetime

# Remove "Lire aussi" blocks
strip: //p[@class='lire']

body: //div[@id='articleBody']

# Remove the insane "conjugaison.lemonde.fr" links:
find_string: <a target='_blank' onclick='return false;' class='lien_interne conjug'
replace_string: <input type='hidden' style='display:none;' 

# Remove the insane cross-linking categories "Toute l’actualité"
find_string: <a class="lien_interne rub"
replace_string: <input type="hidden" style="display:none;"

requires_login: yes

login_uri: https://secure.lemonde.fr/sfuser/connexion
login_username_field: connection[mail]
login_password_field: connection[password]

login_extra_fields: connection[token]=@=xpath("//form//input[@id='connection__token']", request_html(config.getLoginUri()))

not_logged_in_xpath: //body[contains(@class, 'site-gratuit')]//div[@id='teaser_article']


prune: no

test_url: http://www.lemonde.fr/economie/article/2011/07/05/moody-s-abaisse-la-note-du-portugal-de-quatre-crans_1545237_3234.html
test_url: http://www.lemonde.fr/big-browser/article/2017/10/27/assassinat-de-kennedy-ce-qu-on-a-appris-dans-les-documents-declassifies_5207029_4832693.html
