上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

2019年10月21日

python 多线程

摘要: 过程的名字可以随便,但是在下面的类里面就必须用RUN 这就是多线程的两种写法。 算程序运行的时间 应该用 守护线程的意义 正常来讲,这个num结果应该是0, 但在python 2.7上多运行几次,会发现,最后打印出来的num结果不总是0,为什么每次运行的结果不一样呢? 哈,很简单,假设你有A,B两个 阅读全文

posted @ 2019-10-21 14:29 土豆爸 阅读(144) 评论(0) 推荐(0) 编辑

2019年10月20日

xpath helper 表格爬取

摘要: //table[@width="717"]//tr[position()>1]/td[2] 阅读全文

posted @ 2019-10-20 22:01 土豆爸 阅读(404) 评论(0) 推荐(0) 编辑

2019年10月19日

爬取xiachufang图片试手

摘要: __author__ = 'Administrator' # -*- encoding=gbk -*- import requests import os from bs4 import BeautifulSoup from urllib.parse import urlparse r=requests.get('http://xiachufang.com/') soup=BeautifulS... 阅读全文

posted @ 2019-10-19 22:33 土豆爸 阅读(125) 评论(0) 推荐(0) 编辑

2019年10月17日

bs4 beautifullsoup网页内容选择器

摘要: # -*- encoding:utf-8 -*- import requests from bs4 import BeautifulSoup r=requests.get('http://cnblogs.com/xupanfeng') r.encoding='utf-8' import io import sys import urllib.request sys.stdout = io.Text 阅读全文

posted @ 2019-10-17 10:31 土豆爸 阅读(325) 评论(0) 推荐(0) 编辑

2019年10月16日

requests第三方库使用 抓取

摘要: import requests r=requests.get('http://httpbin.org/get') r.text#内容 r.json()#直接变成json格式 r.status_code#200 r.reason#ok r=requests.post('http://httpbin.org/post',{'a':'1'});print(r.json())#post参数传递 r=req 阅读全文

posted @ 2019-10-16 14:08 土豆爸 阅读(192) 评论(0) 推荐(0) 编辑

2019年10月11日

python 爬虫学习

摘要: 看USERAGENT urllib库 2.REQUEST库 阅读全文

posted @ 2019-10-11 23:32 土豆爸 阅读(138) 评论(0) 推荐(0) 编辑

2019年10月10日

解决PRINT函数UTF-8问题

摘要: https://blog.csdn.net/jim7424994/article/details/22675759 Python3.6(windows系统)解决编码问题 Python3.6(windows系统)解决编码问题 1,py文件代码: import urllib.request url = 阅读全文

posted @ 2019-10-10 08:39 土豆爸 阅读(1566) 评论(0) 推荐(0) 编辑

2019年9月30日

网络编程python

摘要: python socket 实例1 客户端 阅读全文

posted @ 2019-09-30 13:20 土豆爸 阅读(186) 评论(0) 推荐(0) 编辑

2019年9月24日

frp 配置指南

摘要: https://www.jianshu.com/p/00c79df1aaf0 简书 frpc 下载地址 https://file.kskxs.com/frp/frp-v0.29.0/frp_0.29.0_windows_amd64.zip http://222.85.35.132:5000/shar 阅读全文

posted @ 2019-09-24 08:38 土豆爸 阅读(480) 评论(0) 推荐(0) 编辑

2019年9月20日

随机数想加PYTHON

摘要: import itertools list1=[14140,13260,14300,14500,14040,13940,13620,13980,17280,13580,13740] mylist = list(itertools.permutations(list1,4)) a=set() for i in mylist: ii=sum(i) if ii==59400: iii=tuple(sor 阅读全文

posted @ 2019-09-20 09:03 土豆爸 阅读(265) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

导航