How to do HTTP request?

4

I would like to make an HTTP request to my college server by imitating the requests sent by the browser so that I can log in and check my grades.

I already have experience with mobile development, my intention is in the future to develop an App for access of notes, absences, college subjects.

How can I make these requests in Node.js?

    
asked by anonymous 13.04.2015 / 16:06

1 answer

3

There are some tools for this type of technique (called Web Scraping). In JavaScript some alternatives are:

  • mechanize-js is an adaptation of the famous Mechanize library (originally available in Perl but today it has support for several languages such as Python, Ruby, JS, etc.);
  • Zombie JS : A browser with no interface capable of fully emulating interaction with a web page, in exactly the same way as a conventional Browser ).
Note that building an application on top of this type of interaction as long as possible is not the ideal strategy - depending on the visualization layer of a system to extract data is a rather unstable technique and may break at the expense of the simplest modifications by part of this system. The best option would be to use a stable API, with versioning and documentation; but this is not always possible.

    
29.04.2015 / 01:49