随笔分类 -  Python

摘要:一、安装Python3.5以上版本。 链接:https://www.python.org/downloads/windows/ 二、安装PyQt5。 使用pip安装:1、进入 C:\Users\你的计算机用户名。 2、新建一个文件夹,命名为pip。 3、进入文件夹新建一个文本文件,命名pip,文件后 阅读全文
posted @ 2019-10-22 23:28 吉光一片羽 阅读(869) 评论(0) 推荐(0)
摘要:学习python时做了一个爬虫爬取百度贴吧的内容,但是用BeautifulSoup得到的结果使用find_all函数却无法获取。 getCommentInfo.py: 1 from urllib import request 2 import requests 3 from bs4 import B 阅读全文
posted @ 2019-04-19 23:41 吉光一片羽 阅读(164) 评论(0) 推荐(0)
摘要:bs4 中 BeautifulSoup 常用命令: BeautifulSoup,prettify,find,find_all,get,get_text 示例: scenery.html如下: 1 <html lang="en"> 2 <head> 3 <meta charset="UTF-8"> 4 阅读全文
posted @ 2019-04-18 20:08 吉光一片羽 阅读(217) 评论(0) 推荐(0)
摘要:介绍: mysqldb是python操作mysql数据库的一个库.mysql的几乎所有的操作都可以实现。 基本使用: import MySQLdb conn = MySQLdb.connect(host='localhost',user='weiyz',passwd='123456',db='tes 阅读全文
posted @ 2019-04-12 12:24 吉光一片羽 阅读(715) 评论(0) 推荐(0)