Giter Site home page Giter Site logo

zoomeye-go's People

Contributors

gyyyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zoomeye-go's Issues

感觉有个用户体验不好的地方

当maxPage>5时,比如为10,则采用并发模式。

此时只要其中一页请求有问题,比如搜索结果只有7页,则访问第8页的时候出错,很可能就会没结果。(因为这时候往往第8页返回的最快)

我觉得程序的逻辑是不是可以更好:先访问第一页,看下结果有多少数量和用户有多少额度,然后根据这两个变量来调整maxPage,再进行余下的并发逻辑。

init bug

运行的命令:
./ZoomEye-go init -apikey xxx-xxx-xx

failed to initialize: json: cannot unmarshal number 9013.0 into Go struct field .resources.search of type int

看了一下代码,search定义的类型是 int,而源站返回的是 9013.0,非int类型,json转struct时候出错。
相关代码:
type ResourcesInfoResult struct {
baseResult
Plan string json:"plan"
Resources *struct {
Interval string json:"interval"
Search int json:"search"
Stats int json:"stats"
} json:"resources"
}
源站返回的结果:
{"plan": "developer", "resources": {"search": 9013.0, "stats": 100, "interval": "month"}}

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.