2019年1月15日
摘要: MongoDB 命令 C:\Program Files\MongoDB\Server\4.0\bin mongo 客户端 mongod 服务端 mongoexport 导出 普通格式,每条记录一行,整个文件不是合法的json 语法: mongoexport -d <数据库> -c <集合> --ou 阅读全文
posted @ 2019-01-15 14:24 若无未来 阅读(583) 评论(0) 推荐(0) 编辑
  2019年1月11日
摘要: from __future__ import unicode_literals import requests import itchat import time def get_news(): url = "http://open.iciba.com/dsapi" r = requests.get(url) contents = r.json()['content']... 阅读全文
posted @ 2019-01-11 18:02 若无未来 阅读(2517) 评论(0) 推荐(0) 编辑
摘要: pipelines.py settings.py 阅读全文
posted @ 2019-01-11 17:58 若无未来 阅读(271) 评论(0) 推荐(0) 编辑
摘要: QiushuSpider items 阅读全文
posted @ 2019-01-11 17:49 若无未来 阅读(327) 评论(0) 推荐(0) 编辑
摘要: spider items 阅读全文
posted @ 2019-01-11 17:45 若无未来 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 准备工作 1. scrapy startproject Jobs 2. cd Jobs 3. scrapy genspider ZhaopinSpider www.zhaopin.com 4. scrapy crawl ZhaopinSpider 5. pip install diskcache 6 阅读全文
posted @ 2019-01-11 17:42 若无未来 阅读(903) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import scrapy import json import os import urllib import time from scrapy.http import Request from selenium import webdriver from selenium.webdriver.common.by import By from ... 阅读全文
posted @ 2019-01-11 17:30 若无未来 阅读(395) 评论(0) 推荐(0) 编辑
  2018年11月19日
摘要: ## md5算法简介 1. **简介** MD5消息摘要算法(MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。MD5由美国密码学家罗纳德·李维斯特(Ronald L 阅读全文
posted @ 2018-11-19 11:31 若无未来 阅读(4381) 评论(0) 推荐(0) 编辑
摘要: 一、 正则表达式 元字符 \d digit,数字(等效:[0-9]) \d+ 匹配连续的数字 \D 非数字 \D{3} 匹配连续的非数字 \w word,单词([A-Z0-9a-z_]) \w{6} 6个单词字符 \W 非单词(单词是指标识符) \W{3} 3个非单词字符 \s space,空白字符 阅读全文
posted @ 2018-11-19 11:25 若无未来 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 一、subprocess模块 call():执行命令,返回程序返回码(int) import subprocess print(subprocess.call("mspaint")) check_output():执行命令,返回输出(bytes) import subprocess import c 阅读全文
posted @ 2018-11-19 11:18 若无未来 阅读(1034) 评论(0) 推荐(0) 编辑