Permalink
Browse files

Fix pagerank failure on empty response, closes #86

  • Loading branch information...
1 parent 25b72a6 commit 6ecc1a85ff03d1b1ef181bc56134b453cbac3cee @chriso chriso committed Mar 19, 2012
Showing with 39 additions and 26 deletions.
  1. +2 −0 builtin/pagerank.coffee
  2. +37 −26 builtin/pagerank.js
View
@@ -24,6 +24,8 @@ class Pagerank extends nodeio.JobClass
@get 'http://toolbarqueries.google.com/tbr?client=navclient-auto&ch='+ch+'&features=Rank&q=info:'+encodeURIComponent(url), (err, data) =>
if err? then return @retry()
+ data = data or ''
+
if match = data.match /Rank_1:1:(10|[0-9])/
@emit input + ',' + match[1]
else
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 6ecc1a8

Please sign in to comment.