Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Node.js equivalent of Perl's WWW::Mechanize?

I'm searching a module for Node which would be similar to WWW::Mechanize for Perl. Or even better to WWW::Mechanize::Firefox.

  • The main functionality would be to find and submit form by name, class or id.
  • The ability to handle cookies would be great
  • and the ability to handle Javascript would be perfect.

If anyone had an idea of something similar, or in which direction I could search, that would really be appreciated.

like image 428
Sami Avatar asked Apr 24 '13 19:04

Sami


Video Answer


1 Answers

What you're looking for is a scriptable/headless browser. In decreasing order of popularity, the options are:

  • Google Puppeteer - "Node library which provides a high-level API to control Chrome or Chromium"
  • Zombie - more lightweight; "Insanely fast, headless full-stack testing using Node.js"
  • slimerjs - scriptable Firefox. No commits since March 2018.
  • mechanize-js, which lacks documentation and has far less traction than any of the above alternatives

Abandoned projects

  • PhantomJS - headless WebKit.
  • chimera - abandoned since 2013
like image 163
Dan Dascalescu Avatar answered Sep 28 '22 08:09

Dan Dascalescu