We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
老师您好 在分页爬取豆瓣图书的时候,遇到一个问题 在循环完成获取到单本书的数据以后,想用list.append把书的信息存到一个列表中用于后续的保存 在存完以后,列表元素的顺序是乱的,没有找到相关说明,请老师帮忙解答一下,感激不尽~~ list.append({book_name,book_path}) 在添加完以后元素顺序就乱了
The text was updated successfully, but these errors were encountered:
是用了多线程吗?多线程情况下每个线程的append动作可能会交错进行,导致顺序错乱,最简单的解决方法,就是把每页的多本书信息一次性append进去
Sorry, something went wrong.
No branches or pull requests
老师您好 在分页爬取豆瓣图书的时候,遇到一个问题
在循环完成获取到单本书的数据以后,想用list.append把书的信息存到一个列表中用于后续的保存
在存完以后,列表元素的顺序是乱的,没有找到相关说明,请老师帮忙解答一下,感激不尽~~
list.append({book_name,book_path})
在添加完以后元素顺序就乱了
The text was updated successfully, but these errors were encountered: