+ 1
Login before fetching data/web scraping
I have a running code for fetching html source of particular page of a website. However, i am getting public version of page. But i want that page which comes only when user is log in. Therefore, before fetching data, i am trying to login to the site and save that session so that when data will be fetched, it will get that version of html page which becomes visible only after log in. The website requires username and password for login. The login page is www.example.com/login while the target page is different. Can someone please help me to do this. I tried with some codes but none help me... https://code.sololearn.com/WGUfWIwLSgxx/?ref=app
8 Réponses
+ 1
So u need a login page with a a forward after successful login
+ 1
OK I read you text again you need a login page with saves the date and activity of your user and if needed reopens that session?
0
No...... I am doing web scraping....before fetching data from a website, i wanted my code to first log in, save that session and then fetch other website pages which are visible only after login....
Thanks
0
Kind of logging......
Let me explain you.....
My current code sends a request to a website to fetch html source of particular page and in return it shows html source page of requested website. However, it currenly showing public version of requested page. Therefore, i wanted to add a logging function in this code. This logging function should help me to first login to a site and then fetch site page through same session using cookies or any other thing. This will help me to fetch that part of data which is visible only after logging into a site.
Thanks
0
No brother....not login page....web scraping
0
So you Want to forward username and password to another page
From your page
0
For that task you'll need to send a post request to another server but if you want to do that over Ajax your site may be detected as a pishing site and blocked.
0
No problem.....before doing this, i would discuss about this topic with the target domain owner.....