from urllib import request,parse from http.cookiejar import CookieJar ur1 = r"https://mail.yeah.net/" #创建一个cookiejar对象 cookiejar = CookieJar() #使用cook ...
分类:
其他好文 时间:
2020-03-16 21:39:25
阅读次数:
60
1 import urllib.request 2 import urllib.parse 3 4 5 params = {'name':'张三',"age":"18",'say':'hello world'} 6 result = urllib.parse.urlencode(params) 7 ...
分类:
Web程序 时间:
2020-03-16 21:38:14
阅读次数:
99
一:时间转时间戳:javascript获得时间戳的方法有四种,都是通过实例化时间对象 new Date() 来进一步获取当前的时间戳 1.var timestamp1 = Date.parse(new Date()); // 结果:1477808630000 不推荐这种办法,毫秒级别的数值被转化为0 ...
分类:
其他好文 时间:
2020-03-16 13:14:02
阅读次数:
67
nltk.parse句法分析 1).上下文无关文法 2).递归下降解析器 3).图表分析,动态规划 from nltk.parse import * parser = CoreNLPParser(url='http://localhost:9966') tokens = 'Rami Eid is s ...
分类:
其他好文 时间:
2020-03-16 09:22:31
阅读次数:
72
pip install opencv-python安装CV2 ImportError: No module named 'ConfigParser',在 Python 3.x 版本后,ConfigParser.py 已经更名为 configparser.py 所以出错! from keras.lay ...
分类:
其他好文 时间:
2020-03-15 19:18:24
阅读次数:
71
概述 ajax跨域方法有很多种。常用的有jsonp请求,xhr2,后台代理方式,基于iframe实现跨域。 jsonp请求 ajax 本身是不可以跨域的,通过产生一个 script 标签来实现跨域。因为 script 标签的 src 属性是没有跨域的限制的。 jquery 其实设置了 dataTyp ...
分类:
Web程序 时间:
2020-03-15 16:23:54
阅读次数:
113
方式一: /** * DateTimeFormatter java 8 线程安全 * @throws Exception */ @Test public void testTimeDiff() throws Exception { // DateTimeFormatter formatter = D ...
分类:
编程语言 时间:
2020-03-14 18:14:00
阅读次数:
377
1 # 视频分解图片 2 # 1.load 2.info 3.parse 4.imshow 5.imwrite 3 import cv2 4 cap = cv2.VideoCapture("./pop/pop.mp4") 5 isOpened = cap.isOpened # 判断是否可以打开 6 ...
分类:
其他好文 时间:
2020-03-14 16:38:19
阅读次数:
65
scrapy中使用selenium来爬取页面 scrapy中如果下载中间件的 返回的是一个response对象,那么它会直接将该response返回 在这里利用selenium将网页渲染过的html抓取下来,然后在将其转换为scrapy所能解析的response对象 最后在spider中的parse ...
分类:
其他好文 时间:
2020-03-14 16:34:15
阅读次数:
54
1. params 传值:该方式传递参数只能通过字符串的方式传递,如果要传递一个对象,需要先将这个对象转化成字符串(JSON.stringify(obj)),接收参数的时候要用this.props.params.xxx,接收参数的时候也可以转成对象使用JSON.parse(string) route ...
分类:
其他好文 时间:
2020-03-14 12:38:41
阅读次数:
104