-
Notifications
You must be signed in to change notification settings - Fork 693
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
utils.py和demo(test_GetUrls.py)中的问题 #45
Comments
还有一个最新发现的问题,Url2Html中run函数在内容删除或者侵权时,account值为NoneType,而源码中没有处理的方法,并且会在305行报错TypeError |
|
感谢提醒,这一部分我一般是在主函数里面做处理。因为框架不能保证所有的情况(及以后可能更新的情况)。目前我见到的情况有
|
在utils.py中定义的是 |
感谢提醒,这个函数上次提交刚做修改,没做更新。已修改。
不过这个bug,我好像还没推送到pypi。。如果用pip安装的话,应该是不会有这个问题 :) |
首先感谢分享!
在运行代码的时候发现utils.py第189行timestamp2date(dt)报错,缺少一个格式化输入。阅读源码后认为这段代码可以删去,或者给定一个日期格式化,否则会在爬取第一轮(10次)的时候报错中断,删去这行代码后代码运行正常。
此外,给出的demo test_GetUrls.py中,84-88行中的url并没有定义(不过可能就是这样写防小白的?)
第27行item=line赋值可以删去,第24行改为
for i, line in enumerate(lst, 0):
同时,第56行需要判断flag是否为1,而这时会报错flag没有定义。应在前面定义flag函数,如在24行加入
flag = 0
根据get_history_urls返回的数据格式,应在24行lst遍历前,加入一个遍历,如:
def demo(lst_list): fj = "" item_lst = [] flag = 0 for lst in lst_list: for i, item in enumerate(lst, 0):
这样在demo中才能正确读取传入的数据,否则会报错。
还有源码53-54行的
finally: save_xlsx(fj, item_lst)
可以删去
感谢代码的分享,节省了很多造轮子的功夫。
The text was updated successfully, but these errors were encountered: