会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
黄明17
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2018年8月20日
线程与进程
摘要: Num01–>线程 线程是操作系统中能够进行运算调度的最小单位。它被包含在进程之中,是进程中的实际运作单位。 一个线程指的是进程中一个单一顺序的控制流。 一个进程中可以并发多条线程,每条线程并行执行不同的任务。 Num02–>进程 进程就是一个程序在一个数据集上的一次动态执行过程。 进程有以下三部分
阅读全文
posted @ 2018-08-20 22:13 黄明17
阅读(94)
评论(0)
推荐(0)
编辑
Python3 requests爬取代理IP并验证可用性
摘要: import requestsfrom lxml import etree# 代理IP的信息存储def write_proxy(proxies): print(proxies) for proxy in proxies: with open("ip_proxy.txt", 'a+') as f: p
阅读全文
posted @ 2018-08-20 21:30 黄明17
阅读(1753)
评论(0)
推荐(0)
编辑
2018年8月16日
正则
摘要: import re line = '\n111songqihua' # \w # match_res = re.match('\w{2,5}', line)# if match_res:# print(match_res)# print('ojbk')# else:# print('不欧克') #
阅读全文
posted @ 2018-08-16 23:04 黄明17
阅读(135)
评论(0)
推荐(0)
编辑
今日头条
摘要: import requestsimport reimport jsonimport osfrom urllib import requestfor i in range(0,60,20): url = 'https://www.toutiao.com/search_content/?offset={
阅读全文
posted @ 2018-08-16 23:01 黄明17
阅读(249)
评论(0)
推荐(0)
编辑
2018年8月15日
requests 用法
摘要: # 百度import requestsurl = 'http://www.baidu.com/'# requests 的 get用法reponse = requests.get(url)with open('baidu23.html', 'wb') as f: f.write(reponse.con
阅读全文
posted @ 2018-08-15 22:04 黄明17
阅读(152)
评论(0)
推荐(0)
编辑
2018年8月13日
拓展 封装
摘要: from urllib import request, parsefrom urllib.error import HTTPError, URLError# a. get(url, headers=None)def get(url, headers=None): return urlrequests
阅读全文
posted @ 2018-08-13 22:41 黄明17
阅读(131)
评论(0)
推荐(0)
编辑