! `form` doesn't contain a `action` attribute

Hi,

my issue is the following:
I try to login to the WSJ site, but the form I need to fill does not contain an action value. Repress enclosed:

library(tidyverse)
library(rvest)
#> 
#> Attaching package: 'rvest'
#> The following object is masked from 'package:readr':
#> 
#>     guess_encoding

s <- session("https://sso.accounts.dowjones.com/login-page?op=localop&scope=openid%20idp_id%20roles%20email%20given_name%20family_name%20djid%20djUsername%20djStatus%20trackid%20tags%20prts%20suuid%20updated_at&client_id=5hssEAdMy0mJTICnJNvC9TXEw3Va7jfO&response_type=code&redirect_uri=https%3A%2F%2Faccounts.wsj.com%2Fauth%2Fsso%2Flogin&nonce=d3dc54f1-fe5e-48e9-bd51-8a68fad0149a&ui_locales=en-us-x-wsj-223-2&mars=-1&ns=prod%2Faccounts-wsj&state=uOiEi-3gL2l96PQr.7-1So7BT-lU63MJRKIYfRsAkhTy_-CPhVwqRvddS3VM&protocol=oauth2&client=5hssEAdMy0mJTICnJNvC9TXEw3Va7jfO#!/signin")

form <- read_html(s) |> 
  html_form() |> 
  first() |> 
  html_form_set(
    username = "xxx",
    password = "xxx",
  )

submit_form(s, form)
#> Warning: `submit_form()` was deprecated in rvest 1.0.0.
#> ℹ Please use `session_submit()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Error in `submission_build()`:
#> ! `form` doesn't contain a `action` attribute
#> Backtrace:
#>     ▆
#>  1. └─rvest::submit_form(s, form)
#>  2.   └─rvest::session_submit(...)
#>  3.     └─rvest:::submission_build(form, submit)
#>  4.       └─rlang::abort("`form` doesn't contain a `action` attribute")

Created on 2023-05-05 with reprex v2.0.2

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.