摘要: #人人网的模拟登录 import requests import urllib from lxml import etree #获取session对象 session = requests.Session() #将验证码图片进行下载 headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit... 阅读全文
posted @ 2019-05-14 10:01 Mr_Smith 阅读(1425) 评论(0) 推荐(0)
摘要: 需要下载webdriver 对应自己的谷歌浏览器版本下载 http://chromedriver.storage.googleapis.com/index.html 阅读全文
posted @ 2019-05-13 21:43 Mr_Smith 阅读(1910) 评论(0) 推荐(0)
摘要: import requestsfrom lxml import etree url='https://bj.58.com/shunyi/ershoufang/?PGTID=0d30000c-0047-6aa6-0218-69d1ed59a77b&ClickID=3'headers = {'User- 阅读全文
posted @ 2019-05-11 00:07 Mr_Smith 阅读(241) 评论(0) 推荐(0)
摘要: 正解解析 常用正则表达式回顾: 阅读全文
posted @ 2019-05-09 21:53 Mr_Smith 阅读(1699) 评论(0) 推荐(0)
摘要: #爬取百度翻译结果 import requestsurl = 'https://fanyi.baidu.com/sug' wd = input('enter a word:') data = { 'kw':wd } response = requests.post(url=url,data=data) print(response.json()) #response.text : 字符串 #... 阅读全文
posted @ 2019-05-09 15:21 Mr_Smith 阅读(140) 评论(0) 推荐(0)
摘要: anaconda jupyter notebook 阅读全文
posted @ 2019-05-07 23:31 Mr_Smith 阅读(140) 评论(0) 推荐(0)
摘要: JWT 在用户注册或登录后,我们想记录用户的登录状态,或者为用户创建身份认证的凭证。我们不再使用Session认证机制,而使用Json Web Token认证机制。 什么是JWT Json web token (JWT), 是为了在网络应用环境间传递声明而执行的一种基于JSON的开放标准((RFC 阅读全文
posted @ 2019-04-16 10:27 Mr_Smith 阅读(226) 评论(0) 推荐(0)
摘要: 现在,前端与后端分处不同的域名,我们需要为后端添加跨域访问的支持。 我们使用CORS来解决后端对跨域访问的支持。 使用django-cors-headers扩展 参考文档https://github.com/ottoyiu/django-cors-headers/ 安装 添加应用 中间层设置 添加白 阅读全文
posted @ 2019-04-16 10:22 Mr_Smith 阅读(224) 评论(0) 推荐(0)
摘要: 克隆文件 git clone https://gitee.com/xxxxx/xxxxx.git 克隆分支文件 git clone -b 分支名 https://gitee.com/xxxxx/xxxxx.git 然后,在你的commits中找到你要下载的版本的commit号,如 切换到指定的版本号 阅读全文
posted @ 2019-04-13 21:04 Mr_Smith 阅读(141) 评论(0) 推荐(0)
摘要: var c= 1<!--都不能预解析-->let a = 1//const不能修改变量const b = 1 箭头函数 =>var c = function fun(a, b) { return a + b}var d = (a, b) => { return a + b}var e = a => 阅读全文
posted @ 2019-04-12 20:45 Mr_Smith 阅读(133) 评论(0) 推荐(0)