graby-site-config
graby-site-config copied to clipboard
Trouble adding larlesienne.info
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"]
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