About PhantomJS

Previously, I said things about PhantomJS. Good things and bad things. PhantomJS is an amazing tool. It is the most complete headless browser out there and it's becoming a standard: its API is already ported to firefox and internet explorer equivalent (TrifleJs and SlimerJs).

If you need to scrape webpage, you not only have access to the DOM but you have access to the whole browser. When scraping a javascript webapp, the DOM isn't enough, you need a complete html5

Read More

javascript

Ghost - The Javascript Blogging Platform

javascript

So much is going on in the javascript world in this end of year! Let's talk about the javascript tool I'm using right now to write this blog post: Ghost. It's a new and very shinny blogging platform.

On the features tab of the Ghost website, you see three words in big characters: "Free. Open. Simple." Right away, they say that they are not trying to be a replacement for the big players already installed as industry standards. I'm talking

Read More

javascript

Injecting scripts with jsdom

javascript

Jsdom is a wonderful NodeJs library I covered in my last post to manipulate the DOM of a website on the server. Its purpose is generally to scrape content of a webpage. For this, it allows cleverly to inject jQuery into the page.

There is 2 ways do to this explained in the readme. The first is achieved by setting the script attribute of the object parameter of jsdom.env function like this :

jsdom.env({
  url: "http://news.ycombinator.com
Read More

javascript

jsdom

javascript

Everytime you use a browser, you see the DOM rendered into (sometimes not) beautiful websites. It's the conversion of raw HTML into a document object model that can be manipulated and rendered. You can easily see what the DOM is by opening your browser's dev tools (ctrl-shift-i on Chrome). When I develop, the Inspector tab is almost always open: this is my playground.

I've been working with NodeJs for quite a long time now and working with the DOM on

Read More