Python
L卫鹏
一个爱好广泛的互联网从业者
展开
-
使用Python爬取酷狗TOP500歌曲
一个简单的Python案例,爬取酷狗TOP500歌曲,仅供学习参考import requestsfrom bs4 import BeautifulSoupimport time# 爬取酷狗TOP500歌曲# 作者:本文博主# 创建时间:2019-08-03# 最后更新时间:2019-08-03headers={"User-Agent": "Mozilla/5.0 (Wind...原创 2019-11-06 14:42:33 · 870 阅读 · 0 评论 -
使用 Python 删除一个文件夹里的所有空文件夹
import osdef del_emp_dir(path): for (root, dirs, files) in os.walk(path): for item in dirs: dir = os.path.join(root, item) try: os.rmdir(dir) ...原创 2019-11-06 14:36:54 · 1905 阅读 · 0 评论 -
解决pycharm问题:module 'pip' has no attribute 'main'
更新pip之后,Pycharm安装package出现报错:module 'pip' has no attribute 'main'找到安装目录下 helpers/packaging_tool.py文件,找到如下代码:def do_install(pkgs): try: import pip except ImportError: er...转载 2019-08-04 16:25:19 · 126 阅读 · 0 评论