]> git.r.bdr.sh - rbdr/generador-de-insultos/commitdiff
Use the selector prop
authorBen Beltran <redacted>
Sun, 6 Sep 2015 01:29:06 +0000 (20:29 -0500)
committerBen Beltran <redacted>
Sun, 6 Sep 2015 01:29:06 +0000 (20:29 -0500)
lib/Conjugator.js

index 5afdf157b3e3dac6bf9f01fe97c6c3a34c057f9d..d45e1fe9eb85626cff8ce383a8a8e40b9ae61dc8 100644 (file)
@@ -10,7 +10,7 @@ var request = require('request');
 var Conjugator = Class({}, "Conjugator")({
   prototype : {
     _baseUrl: "http://www.spanishdict.com/conjugate/",
-    _selector: ".aa .neoConj tr td",
+    _selector: ".vtable-word",
 
     init : function init(config) {
       config = config || {};
@@ -28,7 +28,7 @@ var Conjugator = Class({}, "Conjugator")({
             return reject(err);
           }
           $ = cheerio.load(body);
-          result = $('.vtable-word')[10];
+          result = $(this._selector)[10];
 
           if (!result) {
             console.log("Verb not found: ", verb);