Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scraping a website which requires authentication using node.js

I am trying to scrap this website https://www.erobertparker.com/entrance.aspx it requires authentication I am using request module to get authenticated like this,

 request({
        url:"https://www.erobertparker.com/login.aspx",
        method:"POST",
        form:{UNENTRY:"username",PWENTRY:"password"}
    },
    function(error,response,body){
 })

but i am unable to get authenticated what i am doing wrong can someone please guide me I am new to web scraping world :).

like image 987
khurrum qureshi Avatar asked Mar 24 '26 01:03

khurrum qureshi


1 Answers

It's using an asp.net session cookie. You possibly need to store all cookies in a jar and then send them back on the next request.

like image 71
AndyD Avatar answered Mar 25 '26 15:03

AndyD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!