摘要:
1. 线程池使用 注意 : ProcessPoolExecutor 进程池 不好用 同进程一样 from concurrent.futures import ThreadPoolExecutor,ProcessPoolExecutor def fn(name): for i in range(10) 阅读全文
posted @ 2022-04-28 13:16
我在春天等伱
阅读(51)
评论(0)
推荐(0)
摘要:
1. 方法一: 多线程 # 多线程 需要组件from threading import Threaddef func(): for i in range(100): print('fun', i)if __name__ == '__main__': # 开始使用线程 # 1. 实例化一个进程, 安排 阅读全文
posted @ 2022-04-28 11:29
我在春天等伱
阅读(114)
评论(0)
推荐(0)
摘要:
0. ip更换 import requests url = 'https://www.baidu.com' # 代理ip proxies = { 'https':'218.1.1.1:3308' } reps = requests.get(url, proxies=proxies) print(re 阅读全文
posted @ 2022-04-28 09:36
我在春天等伱
阅读(122)
评论(0)
推荐(0)