![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
github_38339892
这个作者很懒,什么都没留下…
展开
-
Centos7安装Python3的方法
由于centos7原本就安装了Python2,而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到。[root@VM_105_217_centos Python-3.6.2]# pythonPython 2.7.5 (default, Aug 4 2017, 00:39:18)[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on l原创 2017-10-24 23:13:33 · 645 阅读 · 0 评论 -
Python连接SQLite数据库
SQLite作为一款轻型数据库,管理工具有很多,比如SQLite Expert Professional,很适合用来存储Python网站,爬虫的相关数据,下面列出基本的增删查改操作读取操作:conn1 = sqlite3.connect(board.DatabasePath)conn1.row_factory = sqlite3.Rowconn1.execute("prag原创 2017-10-24 23:12:00 · 1525 阅读 · 0 评论 -
Python3处理HTML获取所需内容
处理HTML页面,经常使用的便是使用beautifulsoup库pip install beautifulsoup4执行上述语句下载bs4库一般请求下来的所需数据都位于tbody的tr标签里,下面给出对应代码: soup = BeautifulSoup(r.text, "html.parser") informationlist = [] f原创 2017-10-24 23:11:23 · 1979 阅读 · 0 评论 -
Python3爬虫登录模拟
使用Python爬虫登录系统之后,能够实现的操作就多了很多,下面大致介绍下如何使用Python模拟登录。我们都知道,在前端的加密验证,只要把将加密环境还原出来,便能够很轻易地登录。首先分析登录的步骤,通过审查元素得知input type="button" id="login" name="login" class="login" onclick="Logon();" val原创 2017-10-24 23:10:25 · 479 阅读 · 0 评论 -
Python 3 使用venv创建虚拟环境
Python 3.3以上使用venv来代替了原来Python2使用的virtualenv创建虚拟环境。虚拟环境的作用是使得不同项目的Python包之间不会相互干扰,避免了由此产生的各种问题。现在演示下如何在桌面创建一个虚拟环境C:\Users\dell\Desktop>mkdir python3VenvTestC:\Users\dell\Desktop>cd python原创 2017-10-24 23:09:14 · 2522 阅读 · 0 评论