j0k3r / graby-site-config

Graby site config files
Other
18 stars 29 forks source link

Trouble adding larlesienne.info #47

Open MonsieurPoutounours opened 2 years ago

MonsieurPoutounours commented 2 years ago

Hi,

I can't achieve a working configuration file for larlesienne.info paywalled articles. Maybe it is because the login page has two forms (one for logging in, one for registering) with both username and password inputs ?

Someone can help ?

I tried :

body: //article[contains(concat(' ',normalize-space(@class),' '),' module ')]
test_url: https://larlesienne.info/2022/02/22/la-municipalite-de-carolis-fait-planter-le-service-informatique/

requires_login: yes
login_uri: https://larlesienne.info/mon-compte/
login_username_field: username
login_password_field: password
not_logged_in_xpath: //div[@class="pmpro_content_message"]
j0k3r commented 2 years ago

I don't think it's related to the double form, both aren't using the same id for inputs. I think the problem is you don't retrieve the value of woocommerce-login-nonce and maybe other values from the form.

Try adding:

login_extra_fields: woocommerce-login-nonce=@=xpath('//input[@id="woocommerce-login-nonce"]', request_html('https://larlesienne.info/mon-compte/'))
login_extra_fields: _wp_http_referer=/mon-compte/
login_extra_fields: login=Identification