2020
10-09
10-09
Python如何爬取51cto数据并存入MySQL
实验环境1.安装Python3.72.安装requests,bs4,pymysql模块实验步骤1.安装环境及模块可参考https://www.jb51.net/article/194104.htm2.编写代码#51cto博客页面数据插入mysql数据库#导入模块importreimportbs4importpymysqlimportrequests#连接数据库账号密码db=pymysql.connect(host='172.171.13.229',user='root',passwd='abc123',db='test',port=3306,charset='utf8')#获取游标...
继续阅读 >