Example #1
0
function pull (word, callback) {
  debug('Pulling %s', word);

  scrape.post({ url: url, form: { kelime: word } }, '#hor-minimalist-a td', function (error, match) {
    if (error) return callback(error);
    if (match.length == 0) return callback(undefined, []);
    callback(undefined, match.map(parse));
  });
}
Example #2
0
function pull (word, callback) {
  scrape.post({ url: url, form: { keyword: word } }, '.meaning', function (error, match) {
    if (match.length == 0 || !match[0].html()) return callback(undefined, []);
    callback(undefined, match[0].html().split(/\s*\/\s*/));
  });
}