Skip to content

Instantly share code, notes, and snippets.

@dmvk
Created September 1, 2014 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmvk/c287a6bf1c4a3528a1b8 to your computer and use it in GitHub Desktop.
Save dmvk/c287a6bf1c4a3528a1b8 to your computer and use it in GitHub Desktop.
#fail
request = require "request"
async = require "async"
o = {}
async.times 200, (i, next) ->
console.log "start #{i}"
request "http://www.iwant.cz/Objednavka/Dokonceni?id=#{i}", (e, r, b) ->
return next e if e
console.log "end #{i}"
m = b.match /Na Váš e-mail <b>(.*)<\/b> jsme zaslali informace k objednávce./
if m
console.log m[1]
o[m[1]] = yes
next()
, -> console.log JSON.stringify Object.keys o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment