java - Login into Linkedin with JSoup -


i need login linkedin jsoup, preferably.

this i'm using login website isn't working linkedin.

connection.response res = jsoup     .connect("https://www.linkedin.com/uas/login?goback=&trk=hb_signin")     .data("session_key", mail, "session_password", password)     .method(connection.method.post)     .timeout(60000).  // tried "https://www.linkedin.com/uas/login-submit"  map<string, string> logincookies = res.cookies();     //checking profile see if succesful or if returns login page.     document currentpage = jsoup.connect(someprofilelink).cookies(logincookies).timeout(10000). system.out.println("" + currentpage.text()); 

what doing wrong?

i need able fetch user profiles using web crawler whatever try can't login cookies.

you can login linkedin code:

    try {                  string url = "https://www.linkedin.com/uas/login?goback=&trk=hb_signin";                 connection.response response = jsoup                         .connect(url)                         .method(connection.method.get)                         .execute();                  document responsedocument = response.parse();                 element logincsrfparam = responsedocument                         .select("input[name=logincsrfparam]")                         .first();                  response = jsoup.connect("https://www.linkedin.com/uas/login-submit")                         .cookies(response.cookies())                         .data("logincsrfparam", logincsrfparam.attr("value"))                         .data("session_key", "your_login")                         .data("session_password", "your_password")                         .method(connection.method.post)                         .followredirects(true)                         .execute();                  document document = response.parse();      //            system.out.println(document)                  system.out.println("welcome "                          + document.select(".act-set-name-split-link").html());              } catch (ioexception e) {                 e.printstacktrace();             } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -