Skip to content

Commit 6ecc1a8

Browse files
committed
Fix pagerank failure on empty response, closes #86
1 parent 25b72a6 commit 6ecc1a8

File tree

2 files changed

+39
-26
lines changed

2 files changed

+39
-26
lines changed

builtin/pagerank.coffee

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class Pagerank extends nodeio.JobClass
2424
@get 'http://toolbarqueries.google.com/tbr?client=navclient-auto&ch='+ch+'&features=Rank&q=info:'+encodeURIComponent(url), (err, data) =>
2525
if err? then return @retry()
2626

27+
data = data or ''
28+
2729
if match = data.match /Rank_1:1:(10|[0-9])/
2830
@emit input + ',' + match[1]
2931
else

builtin/pagerank.js

+37-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)