摘要: https://www.cnblogs.com/buddyquan/p/6293503.html 阅读全文
posted @ 2018-12-01 22:34 effortsing 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 1、通过 pip 安装 pymysql [root@bogon ~]# pip install pymysql 2、测试连接 [root@bogon ~]# python Python 3.6.5 (default, Nov 22 2018, 03:13:09) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", ... 阅读全文
posted @ 2018-12-01 21:51 effortsing 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1、Pycharm No module named requests 的解决方法 pip install requests 然后重启pycharm 阅读全文
posted @ 2018-12-01 20:00 effortsing 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1、BeautifulSoup 解析html如何使用 转自:http://blog.csdn.net/u013372487/article/details/51734047 #!/usr/bin/python # -*- coding: UTF-8 -*- from bs4 import BeautifulSoup import re #待分析字符串 html_doc = """ ... 阅读全文
posted @ 2018-12-01 15:17 effortsing 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 1、python爬取贴吧壁纸 1.1、获取整个页面数据 #coding=utf-8 import urllib def getHtml(url): page = urllib.urlopen(url) html = page.read() return html html = getHtml("http://tieba.baidu.com/p/2738151262... 阅读全文
posted @ 2018-12-01 14:53 effortsing 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 6、linux突然所有命令消失 临时解决: export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 永久解决: [root@bogon mysql]# /bin/vi /etc/profil 阅读全文
posted @ 2018-12-01 10:20 effortsing 阅读(207) 评论(0) 推荐(0) 编辑