Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

If response is json: #6

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

likoo commented May 16, 2011

scrape: function (data) {
try {
var json = eval("(" + data + ')')
}
catch(e) {
return false;
}
if (json.data && json.data.status == 'OK')
return json.data.content;
else
return false;
}

If response is json:
scrape: function (data) {
  try {
    var json = eval("(" + data + ')')
  }
  catch(e) {
    return false;
  }
  if (json.data && json.data.status == 'OK')
    return json.data.content;
  else
    return false;
}

@jney jney closed this Mar 26, 2013

@jney jney reopened this Mar 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment