Skip to content

Instantly share code, notes, and snippets.

@rjack
Created September 9, 2011 15:55
Show Gist options
  • Save rjack/1206581 to your computer and use it in GitHub Desktop.
Save rjack/1206581 to your computer and use it in GitHub Desktop.
Is zombie.js sucking less?
zombie = require 'zombie'
browser = new zombie.Browser debug: true, runScripts: false
URL = 'http://ubuntuforums.org/forumdisplay.php?f=331'
browser.visit URL, (err, browser, status) ->
if err
console.log "OMG! #{err}"
return
nodes = browser.querySelectorAll 'a[id^="thread_title"]'
console.log nodes.length
titles = for n in nodes
n.textContent
console.log titles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment