GithubHelp home page GithubHelp logo

Comments (5)

nondanee avatar nondanee commented on August 30, 2024

已经修复了,还是要解释一下
其实是再前一次commit导致的

commit c5be79f447d8a7ba2f361e699864dc82b68f1dfc
Author: nondanee <[email protected]>
Date:   Thu Apr 19 01:00:26 2018 +0800

    optimization: use a formal way (ANSI escape sequences) to clear previous console line, change logic of image url query loop

当时改了退出循环的条件:

每页固定长度 * 页数 >= 总数 则退出

有想到总数为0的问题,所以初值是-1
但没意识到总数0的问题会获取不到。。。
本来是加个条件就好了

然而测试发现有用户的总数计数和实际发得微博数严重不符(62>49)

1/1 Wed May 02 00:04:40 2018
姬关枪啊 1651926050
finish analysis 62/49
practically get 62 weibos, 4 pictures
all tasks done 4/4(100%)
successfull 4, failed 0, total 4
------------------------------
bye bye

于是退回旧逻辑了,当然也可能会误伤
比如突然99页返回空,但其实100页,101页...还有数据,那只就会循环到99页为止

接口太神奇😢(带cookie请求更神奇)

from weibopicdownloader.

kybom avatar kybom commented on August 30, 2024

又出现了这个错误:

36/441 Thu Jan 24 19:23:33 2019
SHY48-周佳怡 5167477072
Traceback (most recent call last):
  File ".\weiboPicDownloader.py", line 244, in <module>
    urls = get_resources(uid, args.video)
  File ".\weiboPicDownloader.py", line 165, in get_resources
    if total == sys.maxsize: total = json_data['data']['cardlistInfo']['total']
KeyError: 'cardlistInfo'

能不能跳过这个异常,继续下面的任务?

from weibopicdownloader.

kybom avatar kybom commented on August 30, 2024

@nondanee 这个问题有什么解决办法

from weibopicdownloader.

nondanee avatar nondanee commented on August 30, 2024

今天修了啊 😯

from weibopicdownloader.

kybom avatar kybom commented on August 30, 2024

哦,好的,我试试。因为没看到log里有说明

from weibopicdownloader.

Related Issues (20)

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.