I have data
<input name="authenticity_token" type="hidden" value="aiUlw1Yh4W47lPQearSEdTkU0rhKpziZOweq5PMTV0Q=" />
I am trying to select it using Jsoup.
Element input = doc.select("input[name=authenticity_token]").first();
String auth_token = input.attr("value");
But that does not work.
I get a null pointer exception in String auth_token =.
java.lang.NullPointerException at crime.ic.Main.main (Main.java:2)
What am I doing wrong?
source
share