摘要: #一.【连接Mongo】 import pymongo #方法一 client = pymongo.MongoClient(host='localhost', port=27017) #方法二 client = MongoClient('mongodb://localhost:27017/') #二.【连接mongo指定数据库’test ‘】: #方法一 db = client.test #方... 阅读全文
posted @ 2019-03-21 16:40 晨光曦微 阅读(104) 评论(0) 推荐(0) 编辑
摘要: D:\MongoDB\Server\4.0\bin 下载地址:https://www.mongodb.com/download-center/community 中文教程:http://www.runoob.com/mongodb/mongodb-window-install.html 简介 在爬虫 阅读全文
posted @ 2019-03-21 16:08 晨光曦微 阅读(185) 评论(0) 推荐(0) 编辑
摘要: python库:pymysql 安装:install pymysql、mysql数据库 一、连接数据库、创建speder库、查询版本、 二、创建表 三、插入数据 3.1、【插入数据2.0升级版,用字典插入数据,不用修改sql语句,只要修改字典即可】 四、更新数据 五、删除数据 六、查询数据 阅读全文
posted @ 2019-03-20 16:54 晨光曦微 阅读(1099) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-03-19 14:33 晨光曦微 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 安装python3.7,安装成功后,在cmd窗口输入python检查是否安装成功,报错:无法启动此程序,因为计算机中丢失api-ms-win-crt-process-l1-1-0.dll 在网上查询了多种方法试过都未解决: 方法1:网上下载vc_redist.x64.exe ,安装后重启电脑,也未能 阅读全文
posted @ 2019-03-17 17:55 晨光曦微 阅读(2860) 评论(0) 推荐(0) 编辑
摘要: #!python3.7 import requests,sys,time,logging,random from lxml import etree logging.basicConfig(level=logging.ERROR, format=' %(asctime)s - %(levelname)s: %(message)s') #DEBUG ERROR format显示格式可按自己喜好调整... 阅读全文
posted @ 2019-03-15 17:02 晨光曦微 阅读(858) 评论(0) 推荐(0) 编辑
摘要: 调试过程将显示: 2019-03-15 14:17:01,538 - DEBUG: 程序现在开始! 2019-03-15 14:17:01,548 - DEBUG: 开始执行:factorial(5) 2019-03-15 14:17:01,551 - DEBUG: 此处【i】值是:0,【total 阅读全文
posted @ 2019-03-15 14:12 晨光曦微 阅读(731) 评论(0) 推荐(0) 编辑
摘要: #python3.7 ''' 功能:实现www.biqukan.com/1_1094/5403177.html小说下载为txtv1.0 ''' import requests,sys,time from lxml import etree ##0.获取所有章节url def get_url_list(catalog_url): res=requests.get(catalog_url) ... 阅读全文
posted @ 2019-03-15 13:31 晨光曦微 阅读(537) 评论(0) 推荐(0) 编辑
摘要: var n=1; if(n>1){ n=0; }else{ n++; } console.log(n); #输出结果:2 var n=1; n = n>1?0 : n++; console.log(n); #输出结果为:1 例子2: var n=1; if(n>1){ n=0; }else{ ++n; } console.log(n); #输出结果:2 ... 阅读全文
posted @ 2019-03-14 14:35 晨光曦微 阅读(330) 评论(0) 推荐(0) 编辑
摘要: new document 点我 阅读全文
posted @ 2019-03-14 10:45 晨光曦微 阅读(665) 评论(0) 推荐(0) 编辑