Login and scrape a remote website using Node.JS [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a login page https://www.mywebsite.com/login,
and a landing page to scrape https://www.mywebsite.com/home.
I want to create a script, preferred written in Node.JS back end server for running in the background without user interaction, that will login through login page, and navigate to the landing page after login, redirect with cookies validated through login.
So basically, it is a script that follows redirection from login page, through landing page without losing the cookies just like a modern browser does.
I have ideas in mind what I'm looking for but I don't know what's the best thing or best approach to use in order to achieve my goals. Any help would be appreciated.
I prefer Node.js as recommendation but open for many other possibilities.

I would suggest looking into Phantom.js, which is a headless browser that might support the functionality that you are looking for. Check out their cookie documentation as well. I hope this is helpful!

Related

Can I share access to a website without sharing my credentials? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 days ago.
Improve this question
I have an account in a website, i want to share it with others without giving them the credentials.
What I tried so far:
I built a chrome extension that connects to my server get the credentials then fill the login form and connect to the website, but that's just like giving them the password.
Using a PHP Web scraper library, I can open the website in my server log in and send back the HTML to the user, when the user clicks on an element in the page I can collect its css selector and send it to the server then the scraper can find and click on that element then send back the result HTML, this will work but it'll never be the same as the real website experience.
Are there any other approaches I should consider?

how to create a login page for a website using html, css, javascript and php & mysql as backend? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new to web development. I want to develop the front page of my website through which users can enter their username and password and login to their accounts. How should I accomplish that?
You can try to make your own implementation but there are a lot of security risks to worry about. Particularly things like SQL Injection. There are frameworks you can use to implement login pages that take care of the security for you. You just need to find the one that works best for you. Zend Framework is one example of a PHP compatible framework that does authentication.
Here is a decent starting point if you really want to write your own log-in/out routines..
https://www.developphp.com/video/PHP/Log-In-Form-Log-Out-Script-Cookies-Sessions-User-Profile
All that is lacking on that page is the layout of the database.

How to embed a Facebook page's reviews into my website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to figure out how to have the Facebook reviews listed for my company embedded into a page on my website. Here is the link for my Facebook reviews: https://www.facebook.com/jump2itpartyrentals/reviews?ref=page_internal. I thought that since this feed was available to the public, I could get around having to obtain a Token to access it, but I haven't had any luck with it.
Any help sure would be appreciated. Thanks!
Since there is no Social Plugin for this, and since scraping is not allowed on Facebook, you MUST use the Graph API for showing the Ratings/Reviews on your external Website. The docs offer everything you need to know, including some example code: https://developers.facebook.com/docs/graph-api/reference/v2.2/page/ratings
You have to use a Page Token. I suggest using an extended one, since it is valid forever. Here's more about Access Tokens, if you don't know how they work:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
Scraping terms: https://www.facebook.com/apps/site_scraping_tos_terms.php
try taking a look at this page in facebook's developers section. it has a bunch of api's for you to use. https://developers.facebook.com/docs/plugins/comments This is a comments bar that will display all comments of your wanted url.

authenticating via facebook to update another database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am very new to web technologies. I don't even know what keywords to search with, so please bear with me.
I want to make a hybrid web app. The user visits the site and gets a login prompt to verify his/her identity via facebook.
When the use logs in correctly, they are allowed to query the database on my website. If the login fails, they cannot query my database.
I do not want any heavy duty SDKs or special purpose libraries. Is there a shortcut, lightweight implementation?
thank you for the help!
I see that you have tagged it as javascript, so i would suggest you t go through this official Facebook tutorial : https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.2
Once the user is done with this, you just need to allow the user to query your database.
P.S. - For a more appropriate answer in regards to the later section, you need to put forward a more "to the point" question.

Build website using JSP or Javascript [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have to build a website which involve e-commerce stuff like it should allow the users to login and then view the available items. Once the user selects the items and makes payment, it may need additional information in the form of some images/videos to complete the order. So, after payment step, it prompts the user to upload the file and when the file is uploaded on the server, request is complete and the user is kept informed about the status.
All the core functionality is already implemented using REST-ful webservices. I am not able to decide if I should implement the website using HTML+JS (using AJAX to call webservices) or should still use JSP and call webservices using java at server side? Someone suggested me that using JSP is better since it will execute on server side and hence will be secured and faster. But, I somehow feel that HTML+JS is easier to go. Is there some specific advantage to use a server side script like JSP for this purpose? Any ideas are most welcome.
Yes server side scripting will be fruitful for this purpose for security constraints. Or you can use angular js though they are easy to learn and they are secure and can make fast XHR request response. :)

Categories

Resources