Giter Site home page Giter Site logo

leetcode-spider's Issues

Error: socket hang up

今天在使用leetcode-spider的时候一直报错,其报错信息如下:

[10:21:26] [lc-spider] INFO - token get
[10:21:28] [lc-spider] INFO - login successfully
[10:21:46] [lc-spider] ERROR - { Error: socket hang up
    at createHangUpError (_http_client.js:254:15)
    at TLSSocket.socketOnEnd (_http_client.js:346:23)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' }
[10:21:46] [lc-spider] ERROR - Error: socket hang up
    at createHangUpError (_http_client.js:254:15)
    at TLSSocket.socketOnEnd (_http_client.js:346:23)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

incorrect username or password

请教一下 我试了好几次都是incorrect username or password, 试了两个账户都是这个error,username和password应该都没错,不知道是哪里出了问题

想提两个功能建议

第一个是多个session的时候,generateMD.js生成的README.md里面的I've solved xxx/xxx problems (xx problems for a fee).能够把所有session算在一起,其实有个简单办法就是看本目录里面有多少个就说明solved多少个,然后再爬一个总题数。

第二个是提供cookie选项,而可以免帐号密码,这样爬完之后,自己再打开leetcode就不用重新登录了。

很好用的爬虫,谢谢!

spider报错,求解决

运行lc-spider,报错,信息如下,不太懂这个东西,求大佬解决~
/usr/local/lib/node_modules/leetcode-spider/lib/spider.js:140
let [, body] = yield request.get('/api/problems/algorithms/')
^

SyntaxError: Unexpected token [
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/usr/local/lib/node_modules/leetcode-spider/lib/entry.js:53:14)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

Difficulty level显示不正确

最近爬下来的题的难度指数不太对,和lc网站上显示的有出入
easy的题会显示成hard,medium的题会显示成easy

Incorrect username or password

前两天还能正常用的,现在就 incorrect username or password 了,应该是 LeetCode 反爬虫策略改了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.