上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 97 下一页
摘要: 一、概念: MogoDB 文档型非关系数据库 二、优缺点 优点: 易扩展: NoSQL数据库的特点 大数量,高性能: 高读写性能(无关系性) 灵活的数据模型: 不需要事先创建数据的存储字段 缺点: 大量重复数据 三、基础知识 # 1.启动命令 mongo # 2.退出 exit # 3.端口:270 阅读全文
posted @ 2019-11-22 10:31 市丸银 阅读(127) 评论(0) 推荐(0)
摘要: 一、安装 # 1. 更新 sudo apt-get update # 2. 安装 sudo apt-get install -y mongodb # 3. 查看是否安装成功 # a. 服务状态 sudo systemctl status mongodb sudo service mongodb st 阅读全文
posted @ 2019-11-22 10:17 市丸银 阅读(552) 评论(0) 推荐(0)
摘要: 一、创建数据库 import pymysql conn = pymysql.connect(host='ip', user='root', password='密码') # 以字典的形式返回操作结果 cursor = conn.cursor(cursor=pymysql.cursors.DictCu 阅读全文
posted @ 2019-11-21 18:03 市丸银 阅读(177) 评论(0) 推荐(0)
摘要: 一、安装 # 1.更新 sudo apt-get update # 2.安装 sduo apt-get install -y mysql-server mysql-client # 3.确保mysql服务开启 sudo service mysql start sudo service mysql s 阅读全文
posted @ 2019-11-21 16:00 市丸银 阅读(239) 评论(0) 推荐(0)
摘要: 语法和jquey几乎一致 安装 conda install pyquery 一、初始化 标准用法 from pyquery import PyQuery as pq import requests # r = requests.get(url='http://www.baidu.com') html 阅读全文
posted @ 2019-11-21 13:00 市丸银 阅读(234) 评论(0) 推荐(0)
摘要: 一、urllib.urlopen 1、urlopen from urllib import request r = request.urlopen('http://www.baidu.com/') # 获取状态码 print(r.status) # 获取相应头 print(r.getheaders( 阅读全文
posted @ 2019-11-20 23:43 市丸银 阅读(463) 评论(0) 推荐(0)
摘要: join用的不错 a = "Hello, world" b = "你好,世界" c = "How are you?" with open(file='a.txt', mode='w', encoding='utf-8') as f: f.write('\n'.join([a, b, c])) f.w 阅读全文
posted @ 2019-11-20 17:57 市丸银 阅读(309) 评论(0) 推荐(0)
摘要: csv 逗号分隔值 一、写入 1、列表 单行添加 import csv # with open(file='a.csv', mode='w', encoding='utf-8', newline='') as f: write = csv.writer(f) write.writerow(['id' 阅读全文
posted @ 2019-11-20 17:49 市丸银 阅读(786) 评论(0) 推荐(0)
摘要: 官网:https://github.com/scrapy-plugins/scrapy-splash 1、安装: pip install scrapy-splash 2、运行splash docker run -p 8050:8050 scrapinghub/splash 3、配置setting文件 阅读全文
posted @ 2019-11-20 13:44 市丸银 阅读(134) 评论(0) 推荐(0)
摘要: 1、urlparse 作用:解析url from urllib import parse url = "https://book.qidian.com/info/1004608738" result = parse.urlparse(url=url) print(result) 结果: ParseR 阅读全文
posted @ 2019-11-20 12:43 市丸银 阅读(139) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 97 下一页