0


python 爬虫 入门 :一点小实战(爬取小说)。

  1. 小说行当不好做,笔趣阁犹如雨后春笋。你要说笔趣阁的资源哪来的?指不定也是从“笔趣阁”中来。今天咱就来爬一部小说试试(侵删)
  2. 随便找个小说网站,随便点本小说,我就不写网址了,看下面图片,准备爬这一部小说,咱先看看网站的robots.txt,没有Disallow,都可以爬,开整。

  1. 到小说具体页面后,先打开源代码查看,发现直接源码里有文字,而且还有一个唯一idnr1”,可以直接使用。现在就要确定这么多章小说,每个章节的url了。

  1. 小说首页中, 有部分章节的链接,打开源代码查看,发现小说具体章节的链接没什么规律,必须要从目录获取,目录名有规律,index_n.html,n取值1~60即可。

  1. 到这步骤就出来了,先访问index获取具体页面,然后从页面中摘取文本保存到列表中(为了保持顺序,你也可以先每章一个文件,最后综合。),最后 将列表结果保存到txt文档里面即可。大约有1200章,263.8万字,往多了算也就二十来兆,没一个图片大,可行。
  2. 开始编写代码, 当我们需要从源代码中找数据时,可以将源代码复制下来,粘贴到程序中测试一下。使用debug模式尝试解析代码。以避免测试过多访问导致封ip等事情。
  1. from bs4 import BeautifulSoup
  2. str = '''
  3. 目录源代码 https://m.a4aa.com/5755/index_2.html
  4. '''
  5. bs = BeautifulSoup(str, "html.parser") # 从目录找到章节ip
  6. data = bs.find_all("section", class_="zxjz fk")[1]
  7. data = [i["href"] for i in data.find_all("a")]
  8. print(data)
  1. from bs4 import BeautifulSoup
  2. str = '''
  3. 小说内容页面源代码 https://m.a4aa.com/5755/3290542.html
  4. '''
  5. bs = BeautifulSoup(str, "html.parser") # 找到需要保存的所有内容
  6. title = bs.find_all("div", id="nr_title")[0] # 章节名
  7. text = '\n' + title.string + '\n\n' # 这样可以识别出目录。
  8. nr1 = bs.find_all("div", id="nr1")[0] # 章节内容
  9. text += nr1.text
  10. print(text)

代码写完后,开始尝试爬取,爬取一般后禁止访问,爬的太快不让干了,所以更改逻辑,一次爬20章,爬完后歇会再爬。

代码:

  1. import asyncio
  2. import os
  3. import pickle
  4. import time
  5. import aiohttp
  6. from bs4 import BeautifulSoup
  7. async def get_url(url, headers, urls, num): # 获取目录num下全部url
  8. url_f = url + "/5755/index_" + str(num) + ".html" # 产生目录url
  9. async with aiohttp.ClientSession() as session:
  10. async with session.get(url=url_f, headers=headers)as resp: # 一个目录至少20个
  11. bs = BeautifulSoup(await resp.text(), "html.parser") # 从目录找到章节ip
  12. data = bs.find_all("section", class_="zxjz fk")[1]
  13. data = [i["href"] for i in data.find_all("a")]
  14. for l in range(len(data)):
  15. urls[l + (num - 1) * 20] = url + data[l]
  16. print("目录", num, "完成")
  17. async def get_text(url, headers, str_data, str_data_ok, num): # 获取章节需要保存的内容
  18. if str_data_ok[num]: # 保存过,不管了
  19. return
  20. async with aiohttp.ClientSession() as session:
  21. async with session.get(url=url, headers=headers)as resp:
  22. bs = BeautifulSoup(await resp.text(), "html.parser") # 找到需要保存的所有内容
  23. title = bs.find_all("div", id="nr_title")[0] # 章节名
  24. text = '\n\n' + title.string + '\n\n' # 这样可以识别出目录。
  25. nr1 = bs.find_all("div", id="nr1")[0] # 章节内容
  26. text += nr1.text
  27. str_data[num] = text # 保存章节
  28. # 完工,标注该章结束
  29. str_data_ok[num] = True
  30. async def get_all_url(url_1, headers, urls): # 获取所有url存到urls
  31. tasks = [asyncio.create_task(get_url(url_1, headers, urls, num)) for num in range(1, 61)]
  32. # tasks = [asyncio.create_task(get_url(url_1, headers, urls, num)) for num in range(1, 2)] # 先来20章试试水
  33. await asyncio.wait(tasks)
  34. async def get_all_text(urls, headers, str_data, str_data_ok, start, end): # 获取所有章节内容存到str_data
  35. # tasks = [asyncio.create_task(get_text(urls[num], headers, str_data, num)) for num in range(len(urls))]
  36. # tasks = [asyncio.create_task(get_text(urls[num], headers, str_data, num)) for num in range(20)]
  37. # 小网站,给人爬崩了,一次请求一部分。
  38. tasks = [asyncio.create_task(get_text(urls[num], headers, str_data, str_data_ok, num)) for num in range(start, end)]
  39. await asyncio.wait(tasks)
  40. if __name__ == "__main__":
  41. # 初始化变量======================================================================
  42. now_time = [time.time(), 0, 0, 0]
  43. seat = '小说.pkl' # python变量保存位置,用于恢复运行
  44. url_1 = "https://m.a4aa.com"
  45. max_len = 1188
  46. urls = [""] * max_len # 所有章节url
  47. urls_ok = False # 章节url是否保存完整
  48. all_text_data = [""] * max_len # 所有数据url
  49. all_text_data_ok = [False] * max_len # 相应章节是否已经保存
  50. save_path = "小说.txt" # 保存位置
  51. headers = {
  52. # 用户代理,某些网站验证用户代理,微微改一下,如果提示要验证码之类的,使用它
  53. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 "
  54. "Safari/537.36 Edg/126.0.0.0",
  55. }
  56. # 加载旧变量 ======================================================================
  57. if os.path.exists(seat): # 加载过去文件
  58. print("检测到已保存文件,是否加载(Y\\N):")
  59. shuru = input()
  60. if shuru == 'Y' or shuru == 'y':
  61. with open(seat, 'rb') as f:
  62. old_data = pickle.load(f)
  63. urls = old_data["urls"] # 所有url
  64. urls_ok = old_data["urls_ok"]
  65. all_text_data = old_data["all_text_data"] # 所有章节文本
  66. all_text_data_ok = old_data["all_text_data_ok"]
  67. print("已完成:", sum(all_text_data_ok) * 100 / len(all_text_data_ok))
  68. print("已加载")
  69. else:
  70. print("未加载")
  71. # 开始执行程序=======================================================================
  72. try: # 出错就保存一下
  73. # 获取目录===========================================================================
  74. if not urls_ok:
  75. loop = asyncio.get_event_loop()
  76. loop.run_until_complete(get_all_url(url_1, headers, urls))
  77. urls_ok = True
  78. print("目录获取完成,开始获取章节", '======================================================')
  79. else:
  80. print("目录已保存过,开始获取章节", '======================================================')
  81. now_time[1] = time.time()
  82. print("用时:", now_time[1] - now_time[0], 's')
  83. # 获取章节===============================================================================
  84. now_num = 0 # 开始章节数-1
  85. while True: # 一个小循环,每次拿一章内容保存,保存完休息会
  86. in_time = time.time()
  87. now_num2 = now_num + 20 # 结束章节
  88. if now_num2 > max_len: # 超限结束
  89. now_num2 = max_len
  90. loop = asyncio.get_event_loop()
  91. loop.run_until_complete(get_all_text(urls, headers, all_text_data, all_text_data_ok, now_num, now_num2))
  92. break
  93. else:
  94. loop = asyncio.get_event_loop()
  95. loop.run_until_complete(get_all_text(urls, headers, all_text_data, all_text_data_ok, now_num, now_num2))
  96. print('已保存', now_num + 1, now_num2, '\n用时:', time.time() - in_time, '小睡一下')
  97. time.sleep(5)
  98. print('睡眠完毕')
  99. now_num += 20
  100. print("文章已全部获取", '======================================================')
  101. now_time[2] = time.time()
  102. print("用时:", now_time[2] - now_time[1], 's')
  103. print("开始保存", '======================================================')
  104. now_time[3] = time.time()
  105. # 保存文本=====================================================================
  106. with open(save_path, mode='w', encoding='utf-8') as f:
  107. for text in all_text_data:
  108. f.write(text)
  109. print("用时:", now_time[3] - now_time[2], 's')
  110. print("总用时:", now_time[3] - now_time[0], 's')
  111. print("已完成:", sum(all_text_data_ok) * 100 / len(all_text_data_ok))
  112. all_data = {"urls": urls, # 所有url
  113. "urls_ok": urls_ok,
  114. "all_text_data": all_text_data, # 所有章节文本
  115. "all_text_data_ok": all_text_data_ok}
  116. with open(seat, 'wb') as f: # 保存变量
  117. pickle.dump(all_data, f)
  118. except Exception as e:
  119. print("已完成:", sum(all_text_data_ok) * 100 / len(all_text_data_ok))
  120. all_data = {"urls": urls, # 所有url
  121. "urls_ok": urls_ok,
  122. "all_text_data": all_text_data, # 所有章节文本
  123. "all_text_data_ok": all_text_data_ok}
  124. with open(seat, 'wb') as f: # 保存变量
  125. pickle.dump(all_data, f)

结果:第一次运行:(有一些超时的,问题不大)

  1. C:\Users\86135\AppData\Local\Programs\Python\Python39\python.exe C:/Users/86135/PycharmProjects/pythonProject/测试/测试.py
  2. 检测到已保存文件,是否加载(Y\N):
  3. y
  4. 已完成: 0.0
  5. 已加载
  6. 目录 6 完成
  7. 目录 25 完成
  8. 目录 51 完成
  9. 目录 22 完成
  10. 目录 31 完成
  11. 目录 42 完成
  12. 目录 30 完成
  13. 目录 53 完成
  14. 目录 20 完成
  15. 目录 13 完成
  16. 目录 32 完成
  17. 目录 5 完成
  18. 目录 45 完成
  19. 目录 41 完成
  20. 目录 21 完成
  21. 目录 12 完成
  22. 目录 4 完成
  23. 目录 44 完成
  24. 目录 2 完成
  25. 目录 7 完成
  26. 目录 37 完成
  27. 目录 38 完成
  28. 目录 40 完成
  29. 目录 15 完成
  30. 目录 55 完成
  31. 目录 48 完成
  32. 目录 29 完成
  33. 目录 50 完成
  34. 目录 57 完成
  35. 目录 47 完成
  36. 目录 59 完成
  37. 目录 28 完成
  38. 目录 3 完成
  39. 目录 26 完成
  40. 目录 33 完成
  41. 目录 10 完成
  42. 目录 56 完成
  43. 目录 43 完成
  44. 目录 39 完成
  45. 目录 8 完成
  46. 目录 1 完成
  47. 目录 35 完成
  48. 目录 14 完成
  49. 目录 27 完成
  50. 目录 60 完成
  51. 目录 34 完成
  52. 目录 23 完成
  53. 目录 54 完成
  54. 目录 19 完成
  55. 目录 24 完成
  56. 目录 17 完成
  57. 目录 9 完成
  58. 目录 18 完成
  59. 目录 52 完成
  60. 目录 58 完成
  61. 目录 36 完成
  62. 目录 11 完成
  63. 目录 49 完成
  64. 目录 16 完成
  65. 目录 46 完成
  66. 目录获取完成,开始获取章节 ======================================================
  67. 用时: 26.672559022903442 s
  68. 已保存 1 20
  69. 用时: 0.9862778186798096 小睡一下
  70. 睡眠完毕
  71. 已保存 21 40
  72. 用时: 0.9691689014434814 小睡一下
  73. 睡眠完毕
  74. 已保存 41 60
  75. 用时: 0.9766478538513184 小睡一下
  76. 睡眠完毕
  77. 已保存 61 80
  78. 用时: 0.9963347911834717 小睡一下
  79. 睡眠完毕
  80. 已保存 81 100
  81. 用时: 0.9797823429107666 小睡一下
  82. 睡眠完毕
  83. 已保存 101 120
  84. 用时: 1.000009536743164 小睡一下
  85. 睡眠完毕
  86. 已保存 121 140
  87. 用时: 0.9792578220367432 小睡一下
  88. 睡眠完毕
  89. 已保存 141 160
  90. 用时: 0.9902822971343994 小睡一下
  91. 睡眠完毕
  92. 已保存 161 180
  93. 用时: 0.9691574573516846 小睡一下
  94. 睡眠完毕
  95. 已保存 181 200
  96. 用时: 30.67471194267273 小睡一下
  97. Task exception was never retrieved
  98. future: <Task finished name='Task-734' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/3293235.html')>
  99. Traceback (most recent call last):
  100. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  101. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  102. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  103. transport, protocol = await self._create_connection_transport(
  104. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  105. await waiter
  106. asyncio.exceptions.CancelledError
  107. During handling of the above exception, another exception occurred:
  108. Traceback (most recent call last):
  109. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  110. conn = await self._connector.connect(
  111. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  112. proto = await self._create_connection(req, traces, timeout)
  113. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  114. _, proto = await self._create_direct_connection(req, traces, timeout)
  115. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  116. raise last_exc
  117. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  118. transp, proto = await self._wrap_create_connection(
  119. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  120. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  121. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  122. self._do_exit(exc_type)
  123. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  124. raise asyncio.TimeoutError
  125. asyncio.exceptions.TimeoutError
  126. The above exception was the direct cause of the following exception:
  127. Traceback (most recent call last):
  128. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  129. async with session.get(url=url, headers=headers)as resp:
  130. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  131. self._resp: _RetType = await self._coro
  132. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  133. raise ConnectionTimeoutError(
  134. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/3293235.html
  135. 睡眠完毕
  136. Task exception was never retrieved
  137. future: <Task finished name='Task-797' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/3293528.html')>
  138. Traceback (most recent call last):
  139. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  140. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  141. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  142. transport, protocol = await self._create_connection_transport(
  143. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  144. await waiter
  145. asyncio.exceptions.CancelledError
  146. During handling of the above exception, another exception occurred:
  147. Traceback (most recent call last):
  148. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  149. conn = await self._connector.connect(
  150. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  151. proto = await self._create_connection(req, traces, timeout)
  152. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  153. _, proto = await self._create_direct_connection(req, traces, timeout)
  154. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  155. raise last_exc
  156. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  157. transp, proto = await self._wrap_create_connection(
  158. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  159. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  160. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  161. self._do_exit(exc_type)
  162. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  163. raise asyncio.TimeoutError
  164. asyncio.exceptions.TimeoutError
  165. The above exception was the direct cause of the following exception:
  166. Traceback (most recent call last):
  167. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  168. async with session.get(url=url, headers=headers)as resp:
  169. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  170. self._resp: _RetType = await self._coro
  171. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  172. raise ConnectionTimeoutError(
  173. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/3293528.html
  174. Task exception was never retrieved
  175. future: <Task finished name='Task-796' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/3293521.html')>
  176. Traceback (most recent call last):
  177. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  178. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  179. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  180. transport, protocol = await self._create_connection_transport(
  181. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  182. await waiter
  183. asyncio.exceptions.CancelledError
  184. During handling of the above exception, another exception occurred:
  185. Traceback (most recent call last):
  186. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  187. conn = await self._connector.connect(
  188. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  189. proto = await self._create_connection(req, traces, timeout)
  190. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  191. _, proto = await self._create_direct_connection(req, traces, timeout)
  192. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  193. raise last_exc
  194. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  195. transp, proto = await self._wrap_create_connection(
  196. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  197. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  198. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  199. self._do_exit(exc_type)
  200. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  201. raise asyncio.TimeoutError
  202. asyncio.exceptions.TimeoutError
  203. The above exception was the direct cause of the following exception:
  204. Traceback (most recent call last):
  205. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  206. async with session.get(url=url, headers=headers)as resp:
  207. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  208. self._resp: _RetType = await self._coro
  209. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  210. raise ConnectionTimeoutError(
  211. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/3293521.html
  212. 已保存 201 220
  213. 用时: 30.99604558944702 小睡一下
  214. 睡眠完毕
  215. 已保存 221 240
  216. 用时: 30.971959352493286 小睡一下
  217. Task exception was never retrieved
  218. future: <Task finished name='Task-853' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/3293732.html')>
  219. Traceback (most recent call last):
  220. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  221. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  222. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  223. transport, protocol = await self._create_connection_transport(
  224. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  225. await waiter
  226. asyncio.exceptions.CancelledError
  227. During handling of the above exception, another exception occurred:
  228. Traceback (most recent call last):
  229. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  230. conn = await self._connector.connect(
  231. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  232. proto = await self._create_connection(req, traces, timeout)
  233. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  234. _, proto = await self._create_direct_connection(req, traces, timeout)
  235. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  236. raise last_exc
  237. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  238. transp, proto = await self._wrap_create_connection(
  239. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  240. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  241. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  242. self._do_exit(exc_type)
  243. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  244. raise asyncio.TimeoutError
  245. asyncio.exceptions.TimeoutError
  246. The above exception was the direct cause of the following exception:
  247. Traceback (most recent call last):
  248. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  249. async with session.get(url=url, headers=headers)as resp:
  250. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  251. self._resp: _RetType = await self._coro
  252. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  253. raise ConnectionTimeoutError(
  254. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/3293732.html
  255. 睡眠完毕
  256. 已保存 241 260
  257. 用时: 6.197637319564819 小睡一下
  258. 睡眠完毕
  259. 已保存 261 280
  260. 用时: 1.0338616371154785 小睡一下
  261. 睡眠完毕
  262. 已保存 281 300
  263. 用时: 2.0356712341308594 小睡一下
  264. 睡眠完毕
  265. 已保存 301 320
  266. 用时: 0.9921369552612305 小睡一下
  267. 睡眠完毕
  268. 已保存 321 340
  269. 用时: 1.0640060901641846 小睡一下
  270. 睡眠完毕
  271. 已保存 341 360
  272. 用时: 1.0201935768127441 小睡一下
  273. 睡眠完毕
  274. 已保存 361 380
  275. 用时: 1.0203821659088135 小睡一下
  276. 睡眠完毕
  277. 已保存 381 400
  278. 用时: 0.9939565658569336 小睡一下
  279. 睡眠完毕
  280. 已保存 401 420
  281. 用时: 1.0569934844970703 小睡一下
  282. 睡眠完毕
  283. 已保存 421 440
  284. 用时: 1.0331060886383057 小睡一下
  285. 睡眠完毕
  286. 已保存 441 460
  287. 用时: 1.0108842849731445 小睡一下
  288. 睡眠完毕
  289. 已保存 461 480
  290. 用时: 1.013477087020874 小睡一下
  291. 睡眠完毕
  292. 已保存 481 500
  293. 用时: 24.80794596672058 小睡一下
  294. 睡眠完毕
  295. 已保存 501 520
  296. 用时: 1.0152294635772705 小睡一下
  297. 睡眠完毕
  298. 已保存 521 540
  299. 用时: 22.0968017578125 小睡一下
  300. 睡眠完毕
  301. 已保存 541 560
  302. 用时: 1.0083670616149902 小睡一下
  303. 睡眠完毕
  304. 已保存 561 580
  305. 用时: 21.392114400863647 小睡一下
  306. 睡眠完毕
  307. 已保存 581 600
  308. 用时: 30.079055547714233 小睡一下
  309. Task exception was never retrieved
  310. future: <Task finished name='Task-1949' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/3299056.html')>
  311. Traceback (most recent call last):
  312. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  313. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  314. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  315. transport, protocol = await self._create_connection_transport(
  316. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  317. await waiter
  318. asyncio.exceptions.CancelledError
  319. During handling of the above exception, another exception occurred:
  320. Traceback (most recent call last):
  321. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  322. conn = await self._connector.connect(
  323. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  324. proto = await self._create_connection(req, traces, timeout)
  325. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  326. _, proto = await self._create_direct_connection(req, traces, timeout)
  327. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  328. raise last_exc
  329. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  330. transp, proto = await self._wrap_create_connection(
  331. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  332. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  333. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  334. self._do_exit(exc_type)
  335. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  336. raise asyncio.TimeoutError
  337. asyncio.exceptions.TimeoutError
  338. The above exception was the direct cause of the following exception:
  339. Traceback (most recent call last):
  340. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  341. async with session.get(url=url, headers=headers)as resp:
  342. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  343. self._resp: _RetType = await self._coro
  344. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  345. raise ConnectionTimeoutError(
  346. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/3299056.html
  347. 睡眠完毕
  348. 已保存 601 620
  349. 用时: 1.0188708305358887 小睡一下
  350. 睡眠完毕
  351. 已保存 621 640
  352. 用时: 1.039496660232544 小睡一下
  353. 睡眠完毕
  354. 已保存 641 660
  355. 用时: 1.0427892208099365 小睡一下
  356. 睡眠完毕
  357. 已保存 661 680
  358. 用时: 1.0124883651733398 小睡一下
  359. 睡眠完毕
  360. 已保存 681 700
  361. 用时: 1.0155725479125977 小睡一下
  362. 睡眠完毕
  363. 已保存 701 720
  364. 用时: 1.0273873805999756 小睡一下
  365. 睡眠完毕
  366. 已保存 721 740
  367. 用时: 1.036287546157837 小睡一下
  368. 睡眠完毕
  369. 已保存 741 760
  370. 用时: 1.0013742446899414 小睡一下
  371. 睡眠完毕
  372. 已保存 761 780
  373. 用时: 1.0504977703094482 小睡一下
  374. 睡眠完毕
  375. 已保存 781 800
  376. 用时: 1.0260164737701416 小睡一下
  377. 睡眠完毕
  378. 已保存 801 820
  379. 用时: 30.63787031173706 小睡一下
  380. Task exception was never retrieved
  381. future: <Task finished name='Task-2636' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/13370518.html')>
  382. Traceback (most recent call last):
  383. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  384. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  385. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  386. transport, protocol = await self._create_connection_transport(
  387. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  388. await waiter
  389. asyncio.exceptions.CancelledError
  390. During handling of the above exception, another exception occurred:
  391. Traceback (most recent call last):
  392. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  393. conn = await self._connector.connect(
  394. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  395. proto = await self._create_connection(req, traces, timeout)
  396. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  397. _, proto = await self._create_direct_connection(req, traces, timeout)
  398. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  399. raise last_exc
  400. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  401. transp, proto = await self._wrap_create_connection(
  402. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  403. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  404. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  405. self._do_exit(exc_type)
  406. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  407. raise asyncio.TimeoutError
  408. asyncio.exceptions.TimeoutError
  409. The above exception was the direct cause of the following exception:
  410. Traceback (most recent call last):
  411. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  412. async with session.get(url=url, headers=headers)as resp:
  413. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  414. self._resp: _RetType = await self._coro
  415. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  416. raise ConnectionTimeoutError(
  417. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/13370518.html
  418. 睡眠完毕
  419. 已保存 821 840
  420. 用时: 30.976993560791016 小睡一下
  421. Task exception was never retrieved
  422. future: <Task finished name='Task-2679' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/13404059.html')>
  423. Traceback (most recent call last):
  424. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  425. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  426. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  427. transport, protocol = await self._create_connection_transport(
  428. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  429. await waiter
  430. asyncio.exceptions.CancelledError
  431. During handling of the above exception, another exception occurred:
  432. Traceback (most recent call last):
  433. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  434. conn = await self._connector.connect(
  435. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  436. proto = await self._create_connection(req, traces, timeout)
  437. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  438. _, proto = await self._create_direct_connection(req, traces, timeout)
  439. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  440. raise last_exc
  441. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  442. transp, proto = await self._wrap_create_connection(
  443. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  444. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  445. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  446. self._do_exit(exc_type)
  447. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  448. raise asyncio.TimeoutError
  449. asyncio.exceptions.TimeoutError
  450. The above exception was the direct cause of the following exception:
  451. Traceback (most recent call last):
  452. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  453. async with session.get(url=url, headers=headers)as resp:
  454. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  455. self._resp: _RetType = await self._coro
  456. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  457. raise ConnectionTimeoutError(
  458. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/13404059.html
  459. 睡眠完毕
  460. 已保存 841 860
  461. 用时: 1.0284440517425537 小睡一下
  462. 睡眠完毕
  463. 已保存 861 880
  464. 用时: 1.0212693214416504 小睡一下
  465. 睡眠完毕
  466. 已保存 881 900
  467. 用时: 1.0207250118255615 小睡一下
  468. 睡眠完毕
  469. 已保存 901 920
  470. 用时: 1.0172266960144043 小睡一下
  471. 睡眠完毕
  472. 已保存 921 940
  473. 用时: 1.0471982955932617 小睡一下
  474. 睡眠完毕
  475. 已保存 941 960
  476. 用时: 1.0365018844604492 小睡一下
  477. 睡眠完毕
  478. 已保存 961 980
  479. 用时: 0.9948766231536865 小睡一下
  480. 睡眠完毕
  481. 已保存 981 1000
  482. 用时: 3.99578857421875 小睡一下
  483. 睡眠完毕
  484. 已保存 1001 1020
  485. 用时: 11.078922271728516 小睡一下
  486. 睡眠完毕
  487. Task exception was never retrieved
  488. future: <Task finished name='Task-3294' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/19071953.html')>
  489. Traceback (most recent call last):
  490. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  491. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  492. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  493. transport, protocol = await self._create_connection_transport(
  494. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  495. await waiter
  496. asyncio.exceptions.CancelledError
  497. During handling of the above exception, another exception occurred:
  498. Traceback (most recent call last):
  499. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  500. conn = await self._connector.connect(
  501. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  502. proto = await self._create_connection(req, traces, timeout)
  503. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  504. _, proto = await self._create_direct_connection(req, traces, timeout)
  505. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  506. raise last_exc
  507. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  508. transp, proto = await self._wrap_create_connection(
  509. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  510. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  511. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  512. self._do_exit(exc_type)
  513. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  514. raise asyncio.TimeoutError
  515. asyncio.exceptions.TimeoutError
  516. The above exception was the direct cause of the following exception:
  517. Traceback (most recent call last):
  518. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  519. async with session.get(url=url, headers=headers)as resp:
  520. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  521. self._resp: _RetType = await self._coro
  522. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  523. raise ConnectionTimeoutError(
  524. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/19071953.html
  525. Task exception was never retrieved
  526. future: <Task finished name='Task-3293' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/19071952.html')>
  527. Traceback (most recent call last):
  528. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  529. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  530. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  531. transport, protocol = await self._create_connection_transport(
  532. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  533. await waiter
  534. asyncio.exceptions.CancelledError
  535. During handling of the above exception, another exception occurred:
  536. Traceback (most recent call last):
  537. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  538. conn = await self._connector.connect(
  539. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  540. proto = await self._create_connection(req, traces, timeout)
  541. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  542. _, proto = await self._create_direct_connection(req, traces, timeout)
  543. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  544. raise last_exc
  545. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  546. transp, proto = await self._wrap_create_connection(
  547. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  548. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  549. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  550. self._do_exit(exc_type)
  551. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  552. raise asyncio.TimeoutError
  553. asyncio.exceptions.TimeoutError
  554. The above exception was the direct cause of the following exception:
  555. Traceback (most recent call last):
  556. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  557. async with session.get(url=url, headers=headers)as resp:
  558. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  559. self._resp: _RetType = await self._coro
  560. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  561. raise ConnectionTimeoutError(
  562. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/19071952.html
  563. 已保存 1021 1040
  564. 用时: 30.70367741584778 小睡一下
  565. 睡眠完毕
  566. 已保存 1041 1060
  567. 用时: 1.005244255065918 小睡一下
  568. 睡眠完毕
  569. Task exception was never retrieved
  570. future: <Task finished name='Task-3424' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/19791607.html')>
  571. Traceback (most recent call last):
  572. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  573. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  574. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  575. transport, protocol = await self._create_connection_transport(
  576. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  577. await waiter
  578. asyncio.exceptions.CancelledError
  579. During handling of the above exception, another exception occurred:
  580. Traceback (most recent call last):
  581. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  582. conn = await self._connector.connect(
  583. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  584. proto = await self._create_connection(req, traces, timeout)
  585. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  586. _, proto = await self._create_direct_connection(req, traces, timeout)
  587. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  588. raise last_exc
  589. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  590. transp, proto = await self._wrap_create_connection(
  591. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  592. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  593. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  594. self._do_exit(exc_type)
  595. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  596. raise asyncio.TimeoutError
  597. asyncio.exceptions.TimeoutError
  598. The above exception was the direct cause of the following exception:
  599. Traceback (most recent call last):
  600. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  601. async with session.get(url=url, headers=headers)as resp:
  602. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  603. self._resp: _RetType = await self._coro
  604. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  605. raise ConnectionTimeoutError(
  606. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/19791607.html
  607. Task exception was never retrieved
  608. future: <Task finished name='Task-3413' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/19620830.html')>
  609. Traceback (most recent call last):
  610. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  611. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  612. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  613. transport, protocol = await self._create_connection_transport(
  614. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  615. await waiter
  616. asyncio.exceptions.CancelledError
  617. During handling of the above exception, another exception occurred:
  618. Traceback (most recent call last):
  619. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  620. conn = await self._connector.connect(
  621. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  622. proto = await self._create_connection(req, traces, timeout)
  623. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  624. _, proto = await self._create_direct_connection(req, traces, timeout)
  625. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  626. raise last_exc
  627. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  628. transp, proto = await self._wrap_create_connection(
  629. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  630. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  631. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  632. self._do_exit(exc_type)
  633. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  634. raise asyncio.TimeoutError
  635. asyncio.exceptions.TimeoutError
  636. The above exception was the direct cause of the following exception:
  637. Traceback (most recent call last):
  638. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  639. async with session.get(url=url, headers=headers)as resp:
  640. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  641. self._resp: _RetType = await self._coro
  642. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  643. raise ConnectionTimeoutError(
  644. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/19620830.html
  645. 已保存 1061 1080
  646. 用时: 30.98487401008606 小睡一下
  647. Task exception was never retrieved
  648. future: <Task finished name='Task-3412' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/19620828.html')>
  649. Traceback (most recent call last):
  650. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  651. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  652. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  653. transport, protocol = await self._create_connection_transport(
  654. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  655. await waiter
  656. asyncio.exceptions.CancelledError
  657. During handling of the above exception, another exception occurred:
  658. Traceback (most recent call last):
  659. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  660. conn = await self._connector.connect(
  661. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  662. proto = await self._create_connection(req, traces, timeout)
  663. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  664. _, proto = await self._create_direct_connection(req, traces, timeout)
  665. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  666. raise last_exc
  667. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  668. transp, proto = await self._wrap_create_connection(
  669. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  670. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  671. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  672. self._do_exit(exc_type)
  673. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  674. raise asyncio.TimeoutError
  675. asyncio.exceptions.TimeoutError
  676. The above exception was the direct cause of the following exception:
  677. Traceback (most recent call last):
  678. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  679. async with session.get(url=url, headers=headers)as resp:
  680. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  681. self._resp: _RetType = await self._coro
  682. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  683. raise ConnectionTimeoutError(
  684. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/19620828.html
  685. 睡眠完毕
  686. 已保存 1081 1100
  687. 用时: 1.0197718143463135 小睡一下
  688. 睡眠完毕
  689. 已保存 1101 1120
  690. 用时: 1.0471570491790771 小睡一下
  691. 睡眠完毕
  692. 已保存 1121 1140
  693. 用时: 1.0287730693817139 小睡一下
  694. 睡眠完毕
  695. 已保存 1141 1160
  696. 用时: 0.9939365386962891 小睡一下
  697. 睡眠完毕
  698. 已保存 1161 1180
  699. 用时: 30.855279684066772 小睡一下
  700. Task exception was never retrieved
  701. future: <Task finished name='Task-3716' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/23189130.html')>
  702. Traceback (most recent call last):
  703. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  704. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  705. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  706. transport, protocol = await self._create_connection_transport(
  707. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  708. await waiter
  709. asyncio.exceptions.CancelledError
  710. During handling of the above exception, another exception occurred:
  711. Traceback (most recent call last):
  712. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  713. conn = await self._connector.connect(
  714. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  715. proto = await self._create_connection(req, traces, timeout)
  716. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  717. _, proto = await self._create_direct_connection(req, traces, timeout)
  718. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  719. raise last_exc
  720. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  721. transp, proto = await self._wrap_create_connection(
  722. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  723. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  724. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  725. self._do_exit(exc_type)
  726. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  727. raise asyncio.TimeoutError
  728. asyncio.exceptions.TimeoutError
  729. The above exception was the direct cause of the following exception:
  730. Traceback (most recent call last):
  731. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  732. async with session.get(url=url, headers=headers)as resp:
  733. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  734. self._resp: _RetType = await self._coro
  735. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  736. raise ConnectionTimeoutError(
  737. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/23189130.html
  738. 睡眠完毕
  739. 文章已全部获取 ======================================================
  740. 用时: 738.5638995170593 s
  741. 开始保存 ======================================================
  742. Task exception was never retrieved
  743. future: <Task finished name='Task-3772' coro=<get_text() done, defined at C:\Users\86135\PycharmProjects\pythonProject\测\测试.py:22> exception=ConnectionTimeoutError('Connection timeout to host https://m.a4aa.com/5755/26752119.html')>
  744. Traceback (most recent call last):
  745. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  746. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  747. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection
  748. transport, protocol = await self._create_connection_transport(
  749. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport
  750. await waiter
  751. asyncio.exceptions.CancelledError
  752. During handling of the above exception, another exception occurred:
  753. Traceback (most recent call last):
  754. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 663, in _request
  755. conn = await self._connector.connect(
  756. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 563, in connect
  757. proto = await self._create_connection(req, traces, timeout)
  758. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1032, in _create_connection
  759. _, proto = await self._create_direct_connection(req, traces, timeout)
  760. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1366, in _create_direct_connection
  761. raise last_exc
  762. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
  763. transp, proto = await self._wrap_create_connection(
  764. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1098, in _wrap_create_connection
  765. return await self._loop.create_connection(*args, **kwargs, sock=sock)
  766. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 141, in __aexit__
  767. self._do_exit(exc_type)
  768. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\async_timeout\__init__.py", line 228, in _do_exit
  769. raise asyncio.TimeoutError
  770. asyncio.exceptions.TimeoutError
  771. The above exception was the direct cause of the following exception:
  772. Traceback (most recent call last):
  773. File "C:\Users\86135\PycharmProjects\pythonProject\测试\测试.py", line 26, in get_text
  774. async with session.get(url=url, headers=headers)as resp:
  775. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1359, in __aenter__
  776. self._resp: _RetType = await self._coro
  777. File "C:\Users\86135\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 667, in _request
  778. raise ConnectionTimeoutError(
  779. aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://m.a4aa.com/5755/26752119.html
  780. 用时: 0.0 s
  781. 总用时: 765.2364585399628 s
  782. 已完成: 98.82154882154882
  783. 进程已结束,退出代码为 0

第二次运行:(将之前超时失败的全部整完。)

  1. C:\Users\86135\AppData\Local\Programs\Python\Python39\python.exe C:/Users/86135/PycharmProjects/pythonProject/测试/测试.py
  2. 检测到已保存文件,是否加载(Y\N):
  3. y
  4. 已完成: 98.82154882154882
  5. 已加载
  6. 目录已保存过,开始获取章节 ======================================================
  7. 用时: 1.8765432834625244 s
  8. 已保存 1 20
  9. 用时: 0.0020132064819335938 小睡一下
  10. 睡眠完毕
  11. 已保存 21 40
  12. 用时: 0.0 小睡一下
  13. 睡眠完毕
  14. 已保存 41 60
  15. 用时: 0.0 小睡一下
  16. 睡眠完毕
  17. 已保存 61 80
  18. 用时: 0.0 小睡一下
  19. 睡眠完毕
  20. 已保存 81 100
  21. 用时: 0.0 小睡一下
  22. 睡眠完毕
  23. 已保存 101 120
  24. 用时: 0.0 小睡一下
  25. 睡眠完毕
  26. 已保存 121 140
  27. 用时: 0.0 小睡一下
  28. 睡眠完毕
  29. 已保存 141 160
  30. 用时: 0.0 小睡一下
  31. 睡眠完毕
  32. 已保存 161 180
  33. 用时: 0.0 小睡一下
  34. 睡眠完毕
  35. 已保存 181 200
  36. 用时: 1.1031506061553955 小睡一下
  37. 睡眠完毕
  38. 已保存 201 220
  39. 用时: 1.1709847450256348 小睡一下
  40. 睡眠完毕
  41. 已保存 221 240
  42. 用时: 1.0908143520355225 小睡一下
  43. 睡眠完毕
  44. 已保存 241 260
  45. 用时: 0.0 小睡一下
  46. 睡眠完毕
  47. 已保存 261 280
  48. 用时: 0.0 小睡一下
  49. 睡眠完毕
  50. 已保存 281 300
  51. 用时: 0.0 小睡一下
  52. 睡眠完毕
  53. 已保存 301 320
  54. 用时: 0.0 小睡一下
  55. 睡眠完毕
  56. 已保存 321 340
  57. 用时: 0.0 小睡一下
  58. 睡眠完毕
  59. 已保存 341 360
  60. 用时: 0.0 小睡一下
  61. 睡眠完毕
  62. 已保存 361 380
  63. 用时: 0.0 小睡一下
  64. 睡眠完毕
  65. 已保存 381 400
  66. 用时: 0.0 小睡一下
  67. 睡眠完毕
  68. 已保存 401 420
  69. 用时: 0.0 小睡一下
  70. 睡眠完毕
  71. 已保存 421 440
  72. 用时: 0.0 小睡一下
  73. 睡眠完毕
  74. 已保存 441 460
  75. 用时: 0.0 小睡一下
  76. 睡眠完毕
  77. 已保存 461 480
  78. 用时: 0.0 小睡一下
  79. 睡眠完毕
  80. 已保存 481 500
  81. 用时: 0.0 小睡一下
  82. 睡眠完毕
  83. 已保存 501 520
  84. 用时: 0.0 小睡一下
  85. 睡眠完毕
  86. 已保存 521 540
  87. 用时: 0.0 小睡一下
  88. 睡眠完毕
  89. 已保存 541 560
  90. 用时: 0.0 小睡一下
  91. 睡眠完毕
  92. 已保存 561 580
  93. 用时: 0.0 小睡一下
  94. 睡眠完毕
  95. 已保存 581 600
  96. 用时: 1.1043505668640137 小睡一下
  97. 睡眠完毕
  98. 已保存 601 620
  99. 用时: 0.0 小睡一下
  100. 睡眠完毕
  101. 已保存 621 640
  102. 用时: 0.0 小睡一下
  103. 睡眠完毕
  104. 已保存 641 660
  105. 用时: 0.0 小睡一下
  106. 睡眠完毕
  107. 已保存 661 680
  108. 用时: 0.0 小睡一下
  109. 睡眠完毕
  110. 已保存 681 700
  111. 用时: 0.0 小睡一下
  112. 睡眠完毕
  113. 已保存 701 720
  114. 用时: 0.0 小睡一下
  115. 睡眠完毕
  116. 已保存 721 740
  117. 用时: 0.0 小睡一下
  118. 睡眠完毕
  119. 已保存 741 760
  120. 用时: 0.0 小睡一下
  121. 睡眠完毕
  122. 已保存 761 780
  123. 用时: 0.0 小睡一下
  124. 睡眠完毕
  125. 已保存 781 800
  126. 用时: 0.0 小睡一下
  127. 睡眠完毕
  128. 已保存 801 820
  129. 用时: 1.184851884841919 小睡一下
  130. 睡眠完毕
  131. 已保存 821 840
  132. 用时: 1.1437313556671143 小睡一下
  133. 睡眠完毕
  134. 已保存 841 860
  135. 用时: 0.0 小睡一下
  136. 睡眠完毕
  137. 已保存 861 880
  138. 用时: 0.0 小睡一下
  139. 睡眠完毕
  140. 已保存 881 900
  141. 用时: 0.0 小睡一下
  142. 睡眠完毕
  143. 已保存 901 920
  144. 用时: 0.0 小睡一下
  145. 睡眠完毕
  146. 已保存 921 940
  147. 用时: 0.0 小睡一下
  148. 睡眠完毕
  149. 已保存 941 960
  150. 用时: 0.0 小睡一下
  151. 睡眠完毕
  152. 已保存 961 980
  153. 用时: 0.0 小睡一下
  154. 睡眠完毕
  155. 已保存 981 1000
  156. 用时: 0.0 小睡一下
  157. 睡眠完毕
  158. 已保存 1001 1020
  159. 用时: 0.0 小睡一下
  160. 睡眠完毕
  161. 已保存 1021 1040
  162. 用时: 1.0622766017913818 小睡一下
  163. 睡眠完毕
  164. 已保存 1041 1060
  165. 用时: 0.0 小睡一下
  166. 睡眠完毕
  167. 已保存 1061 1080
  168. 用时: 1.0756304264068604 小睡一下
  169. 睡眠完毕
  170. 已保存 1081 1100
  171. 用时: 0.0 小睡一下
  172. 睡眠完毕
  173. 已保存 1101 1120
  174. 用时: 0.0 小睡一下
  175. 睡眠完毕
  176. 已保存 1121 1140
  177. 用时: 0.0 小睡一下
  178. 睡眠完毕
  179. 已保存 1141 1160
  180. 用时: 0.0 小睡一下
  181. 睡眠完毕
  182. 已保存 1161 1180
  183. 用时: 1.0669140815734863 小睡一下
  184. 睡眠完毕
  185. 文章已全部获取 ======================================================
  186. 用时: 306.5122067928314 s
  187. 开始保存 ======================================================
  188. 用时: 0.0 s
  189. 总用时: 308.38875007629395 s
  190. 已完成: 100.0
  191. 进程已结束,退出代码为 0

这是最后的文件结果:

发送到手机上看看:没有问题。

标签: 爬虫

本文转载自: https://blog.csdn.net/weixin_58196051/article/details/143159343
版权归原作者 i道i 所有, 如有侵权,请联系我们删除。

“python 爬虫 入门 :一点小实战(爬取小说)。”的评论:

还没有评论