Skip to content

Commit

Permalink
Merge pull request fivefilters#13 from bdunogier/monde-diplomatique.fr
Browse files Browse the repository at this point in the history
Configuration for monde-diplomatique.fr + nextinpact.fr
  • Loading branch information
j0k3r authored Jan 18, 2017
2 parents adf4a3b + f58df97 commit 4ec2e13
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions monde-diplomatique.fr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title://h1[@class="h1"]
body: //div[@class="contenu-principal"]/div[@class="texte"]

requires_login: yes

login_uri: https://lecteurs.mondediplo.net/?page=connexion
login_username_field: email
login_password_field: mot_de_passe

login_extra_fields: page=connexion
login_extra_fields: formulaire_action=identification_lecteur
login_extra_fields: formulaire_action_args=@=xpath("//form//input[@name='formulaire_action_args']", request_html(config.getLoginUri()))
login_extra_fields: retour=http://www.monde-diplomatique.fr/
login_extra_fields: site_distant=http://www.monde-diplomatique.fr/
login_extra_fields: valider=valider

not_logged_in_xpath: //div[@id="paywall"]

test_url: http://blog.mondediplo.net/2017-01-13-Les-vrais-responsables-des-fausses-nouvelles
14 changes: 14 additions & 0 deletions nextinpact.com.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
prune:yes

body://div[@itemprop="articleBody"]

requires_login: yes
login_uri: https://www.nextinpact.com/Account/Login
login_username_field: UserName
login_password_field: Password
not_logged_in_xpath: //h2[@class="title_reserve_article"]

login_extra_fields: __RequestVerificationToken=@=xpath('//form[@action="/Account/Login"]/input[@name="__RequestVerificationToken"]', request_html('https://www.nextinpact.com/Account/Login?http://www.nextinpact.com/', {'headers': {'X-Requested-With':'XMLHttpRequest'}}))
login_extra_fields: returnUrl=https://www.nextinpact.com/news/102835-pour-cour-comptes-fonctionnement-actuel-vote-par-internet-nest-pas-satisfaisant.htm

test_url: https://www.nextinpact.com/news/102862-free-problemes-dns-a-repetition-rendent-difficile-navigation-web.htm

0 comments on commit 4ec2e13

Please sign in to comment.