Skip to content

Instantly share code, notes, and snippets.

@t3chnoboy
Created March 8, 2014 18:00
Show Gist options
  • Select an option

  • Save t3chnoboy/9436029 to your computer and use it in GitHub Desktop.

Select an option

Save t3chnoboy/9436029 to your computer and use it in GitHub Desktop.
http = require 'http'
http.get 'http://www.lostfilm.tv', (resp) ->
htmlString = ''
resp.on 'data', (chunk) -> htmlString += chunk
resp.on 'end', ->
titleRegex = /<span class="torrent_title"><b>.+\((.+)\)<\/b><\/span>/g
while results = titleRegex.exec htmlString
console.log results[1].replace '<wbr>', ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment