上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: import asyncio import time # 协程(Coroutine),也可以被称为微线程,是一种用户态内的上下文切换技术。 # 简而言之,其实就是通过一个线程实现代码块相互切换执行 # asyncio是Python 3.4版本引入的标准库,直接内置了对异步IO的支持。 # async 阅读全文
posted @ 2023-03-03 22:52 0x1e61 阅读(13) 评论(0) 推荐(0) 编辑
摘要: import csv import time from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor import requests # 存储文件 f = open('data.csv', mode='w', en 阅读全文
posted @ 2023-03-03 21:50 0x1e61 阅读(12) 评论(0) 推荐(0) 编辑
摘要: from multiprocessing import Process def task(name): for i in range(10000): print(f"{name}:",i) if __name__ == '__main__': p = Process(target=task,args 阅读全文
posted @ 2023-03-03 20:44 0x1e61 阅读(6) 评论(0) 推荐(0) 编辑
摘要: # 线程类 from threading import Thread def func(): for i in range(1000): print("func", 1) if __name__ == '__main__': t = Thread(target=func) # 创建线程并给线程安排任 阅读全文
posted @ 2023-03-03 20:37 0x1e61 阅读(7) 评论(0) 推荐(0) 编辑
摘要: import requests # 使用代理获取百度首页 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0. 阅读全文
posted @ 2023-03-03 19:43 0x1e61 阅读(16) 评论(0) 推荐(0) 编辑
摘要: import requests url = 'https://www.xread8.com/user/login.json' headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 阅读全文
posted @ 2023-03-03 14:11 0x1e61 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import requests from lxml import etree url = 'https://changsha.zbj.com/xcxkfzbjzbj/f.html?fr=zbj.sy.zyyw_2nd.lv3&r=2' headers = { 'User-Agent': 'Mozil 阅读全文
posted @ 2023-03-02 23:28 0x1e61 阅读(17) 评论(0) 推荐(0) 编辑
摘要: # 准备一个html格式文档 doc = ''' <div> <ul> <li class="item-0"><a href="https://ask.hellobi.com/link1.html">first item</a></li> <li class="item-1"><a href="ht 阅读全文
posted @ 2023-03-02 21:45 0x1e61 阅读(16) 评论(0) 推荐(0) 编辑
摘要: VLAN数据帧格式 要使交换机能够分辨不同VLAN的报文,需要在报文中添加标识VLAN信息的字段。IEEE 802.1Q协议规定,在以太网数据帧的目的MAC地址和源MAC地址字段之后、协议类型字段之前加入4个字节的VLAN标签(又称VLAN Tag,简称Tag),用于标识数据帧所属的VLAN。 在一 阅读全文
posted @ 2023-03-02 10:39 0x1e61 阅读(568) 评论(0) 推荐(0) 编辑
摘要: import requests from bs4 import BeautifulSoup url = 'http://www.umeituku.com/bizhitupian/meinvbizhi/' headers = { 'User-Agent': 'Mozilla/5.0 (Windows 阅读全文
posted @ 2023-03-01 22:49 0x1e61 阅读(41) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页