Login

Premades & Resources to be used with Helium Scraper 3
Post Reply
webmaster
Site Admin
Posts: 491
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Login

Post by webmaster » Wed Apr 04, 2018 8:18 am

This action takes a username and password and logs you in on most login pages. If no login fields are found, it will assume you're already logged in and continue the extraction. To use this on your project, follow these instructions.

Code: Select all

function (username password)
   Sequence.FirstOrDefault
      ·  Browser.EvalScript
            ·  "try{var t=document.querySelector('input[type=password]').form.querySelector('input[type=\"text\"],input[type=\"email\"]');if(!t)throw 0;return[t]}catch(t){return[]}"
            ·  0
         Browser.EnterText
            ·  username
         SelectBy.Css
            ·  "input[type=password]"
         Browser.SubmitText
            ·  password
         Browser.Wait
            ·  1000
   State.RememberURL
Use it as in the following example (this example assumes it's been already pasted under the name Login)

Code: Select all

Login
   ·  "username"
   ·  "password"
Juan Soldi
The Helium Scraper Team

Post Reply