Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test data #1

Closed
15 tasks done
fkztw opened this issue Nov 15, 2016 · 4 comments
Closed
15 tasks done

Test data #1

fkztw opened this issue Nov 15, 2016 · 4 comments

Comments

@fkztw
Copy link
Owner Author

fkztw commented Nov 15, 2016

$ node index.js "http://2d-gate.org/thread-13318-1-7.html#.WCYP8Hc8XBI"
/home/m157q/github/2dg/index.js:31
        var code = $("script").last().text()
                   ^

TypeError: $ is not a function
    at Object.callback (/home/m157q/github/2dg/index.js:31:20)
    at Crawler._onContent (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:461:17)
    at Request._callback (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:351:18)
    at Request.self.callback (/home/m157q/github/2dg/node_modules/crawler/node_modules/request/request.js:236:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/home/m157q/github/2dg/node_modules/crawler/node_modules/request/request.js:1142:14)
    at emitOne (events.js:101:20)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/home/m157q/github/2dg/node_modules/crawler/node_modules/request/request.js:1096:12)

@fkztw
Copy link
Owner Author

fkztw commented Nov 15, 2016

Maybe we need to wait until the jQuery loaded.

@fkztw
Copy link
Owner Author

fkztw commented Nov 15, 2016

$ node index.js "http://2d-gate.org/thread-11531-1-12.html#.WCYQuHc8XBI"
數碼寶貝大冒險 (S1) [[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */@繁][01~54][End]
[ '數碼寶貝大冒險 (S1) [[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e--;)if(t[e].getAttribute(\'data-cfhash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-cfemail\')){for(e=\'\',r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+=\'%\'+(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */@繁][01~54][End]',
  '數碼寶貝大冒險 (S1) ',
  '[01~54][End]',
  index: 0,
  input: '數碼寶貝大冒險 (S1) [[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e--;)if(t[e].getAttribute(\'data-cfhash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-cfemail\')){for(e=\'\',r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+=\'%\'+(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */@繁][01~54][End]' ]
[數碼寶貝大冒險 (S1)][01~54][End] - 05  [#                                                 ] 2% 360.153 sec 681.60 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 04  [#                                                 ] 2% 381.253 sec 649.50 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 08  [#                                                 ] 3% 227.174 sec 941.19 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 09  [#                                                 ] 1% 498.154 sec 456.99 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 01  [#                                                 ] 1% 518.711 sec 423.90 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 15  [#                                                 ] 2% 274.628 sec 826.09 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 16  [                                                  ] 1% 774.946 sec 318.20 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 11  [                                                  ] 1% 779.867 sec 306.26 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 02  [                                                  ] 0% 1415.549 sec 160.98 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 19  [                                                  ] 1% 736.569 sec 286.74 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 18  [                                                  ] 0% 1163.525 sec 201.94 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 17  [                                                  ] 0% 1951.409 sec 128.96 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 06  [                                                  ] 0% 1483.37 sec 160.07 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 13  [                                                  ] 0% 1126.594 sec 206.29 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 14  [                                                  ] 0% 2113.931 sec 109.21 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 22  [                                                  ] 0% 3076.064 sec 74.14 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 20  [                                                  ] 0% 3165.147 sec 74.59 kB/s
[數碼寶貝大冒險 (S1)][01~54][End] - 24  [                                                  ] 0% null sec 0.00 kB/s
/home/m157q/github/2dg/index.js:45
        var type = /.*\/(.*)/.exec(url.type)[1]
                                      ^

TypeError: Cannot read property 'type' of undefined
    at Object.callback (/home/m157q/github/2dg/index.js:45:39)
    at Crawler._onInject (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:469:13)
    at /home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:458:18
    at Crawler._inject (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:147:9)
    at Crawler._onContent (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:457:14)
    at Request._callback (/home/m157q/github/2dg/node_modules/crawler/lib/crawler.js:351:18)
    at Request.self.callback (/home/m157q/github/2dg/node_modules/crawler/node_modules/request/request.js:236:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/home/m157q/github/2dg/node_modules/crawler/node_modules/request/request.js:1142:14)

@fkztw fkztw closed this as completed Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant