Git Product home page Git Product logo

Comments (1)

peng-zhihui avatar peng-zhihui commented on September 28, 2024 6

先获得一个和动态唯一相关的id号,即Dynamic_id

然后调用GetUsers函数,将该动态下所有作为一级评论员的用户信息抓取下来
其中调用了GetTotalRepost函数,对用户的数量先做一个初步规模获取,即得到count的数量
又调用了GetMiddleStr函数,相当于一个定位函数,配合着在条件允许范围内的commentindex找到对应位置用户所发的信息
然后对json包进行解包工作,摘出各项子信息
然后常规地将用户信息塞入list返回

utils中封装了二分搜索,可能是预先为了按照某种条件来筛选获奖用户
但是最后直接计算幸运值并排序可能是更直接与方便的选择便被弃用了

十分正确

from bilibililottery.

Related Issues (4)

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.