cobweb-launcher 1.1.21__py3-none-any.whl → 1.1.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cobweb-launcher might be problematic. Click here for more details.

@@ -1,5 +1,6 @@
1
1
  import threading
2
2
  import time
3
+ import traceback
3
4
 
4
5
  from inspect import isgenerator
5
6
  from typing import Union, Callable, Mapping
@@ -129,7 +130,8 @@ class Crawler(threading.Thread):
129
130
  retry=seed.params.retry,
130
131
  priority=seed.params.priority,
131
132
  seed_version=seed.params.seed_version,
132
- identifier=seed.identifier or "", exception=e
133
+ identifier=seed.identifier or "",
134
+ exception=''.join(traceback.format_exception(type(e), e, e.__traceback__))
133
135
  ))
134
136
  seed.params.retry += 1
135
137
  self.launcher_queue['todo'].push(seed)
cobweb/utils/oss.py CHANGED
@@ -1,6 +1,7 @@
1
+ from typing import List
1
2
  from cobweb import setting
2
3
  from requests import Response
3
- from oss2 import Auth, Bucket, models
4
+ from oss2 import Auth, Bucket, models, PartIterator
4
5
  from cobweb.exceptions import oss_db_exception
5
6
  from cobweb.base.decorators import decorator_oss_db
6
7
 
@@ -54,6 +55,10 @@ class OssUtil:
54
55
  """分片上传"""
55
56
  return self._client.upload_part(key, upload_id, position, data)
56
57
 
58
+ def list_part(self, key, upload_id): # -> List[models.ListPartsResult]:
59
+ """获取分片列表"""
60
+ return [part_info for part_info in PartIterator(self._client, key, upload_id)]
61
+
57
62
  @decorator_oss_db(exception=oss_db_exception.OssDBMergeError)
58
63
  def merge(self, key, upload_id, parts=None) -> models.PutObjectResult:
59
64
  """合并分片"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cobweb-launcher
3
- Version: 1.1.21
3
+ Version: 1.1.23
4
4
  Summary: spider_hole
5
5
  Home-page: https://github.com/Juannie-PP/cobweb
6
6
  Author: Juannie-PP
@@ -10,7 +10,7 @@ cobweb/base/request.py,sha256=tEkgMVUfdQI-kZuzWuiit9P_q4Q9-_RZh9aXXpc0314,2352
10
10
  cobweb/base/response.py,sha256=eB1DWMXFCpn3cJ3yzgCRU1WeZAdayGDohRgdjdMUFN4,406
11
11
  cobweb/base/seed.py,sha256=Uz_VBRlAxNYQcFHk3tsZFMlU96yPOedHaWGTvk-zKd8,2908
12
12
  cobweb/crawlers/__init__.py,sha256=Rr3DTjD-abMA1_FYcQJZYNvQvcWMuEVcsIU6duqHrw4,75
13
- cobweb/crawlers/base_crawler.py,sha256=05uIIPs_1RdRKPfEcS8zAwgXbBODOJqAJUjWsMw7jQo,5651
13
+ cobweb/crawlers/base_crawler.py,sha256=ee_WSDnPQpPTk6wlFuY2UEx5L3hcsAZFcr6i3GLSry8,5751
14
14
  cobweb/crawlers/file_crawler.py,sha256=2Sjbdgxzqd41WykKUQE3QQlGai3T8k-pmHNmPlTchjQ,4454
15
15
  cobweb/db/__init__.py,sha256=ut0iEyBLjcJL06WNG_5_d4hO5PJWvDrKWMkDOdmgh2M,30
16
16
  cobweb/db/redis_db.py,sha256=NNI2QkRV1hEZI-z-COEncXt88z3pZN6wusKlcQzc8V4,4304
@@ -23,10 +23,10 @@ cobweb/pipelines/__init__.py,sha256=xanY-Z1d7zRR5JhCdW2htzrAywnKBkigiaUlTFa6of0,
23
23
  cobweb/pipelines/base_pipeline.py,sha256=fYnWf79GmhufXpcnMa3te18SbmnVeYLwxfyo-zLd9CY,1577
24
24
  cobweb/pipelines/loghub_pipeline.py,sha256=cjPO6w6UJ0jNw2fVvdX0BCdlm58T7dmYXlxzXOBpvfY,1027
25
25
  cobweb/utils/__init__.py,sha256=JTE4sBfHnKHhD6w9Auk0MIT7O9BMOamCeryhlHNx3Zg,47
26
- cobweb/utils/oss.py,sha256=qAl05ybL2Jp6KFjHDHVMfmeBHQmDKPtZleHjHAY7LZc,3277
26
+ cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
27
27
  cobweb/utils/tools.py,sha256=bVd3iRGBvwhohQAH7AXTTjbmQ54Z35K0O-fatEyhePU,1249
28
- cobweb_launcher-1.1.21.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
29
- cobweb_launcher-1.1.21.dist-info/METADATA,sha256=jPQSJUuw_07x61hjH52AhxralQQjb8yDVnR0ajtccmU,1246
30
- cobweb_launcher-1.1.21.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
31
- cobweb_launcher-1.1.21.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
32
- cobweb_launcher-1.1.21.dist-info/RECORD,,
28
+ cobweb_launcher-1.1.23.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
29
+ cobweb_launcher-1.1.23.dist-info/METADATA,sha256=X93ltTYRGmvdT8oWACxycFetJ2KV3BgZdBP_MtDkE5U,1246
30
+ cobweb_launcher-1.1.23.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
31
+ cobweb_launcher-1.1.23.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
32
+ cobweb_launcher-1.1.23.dist-info/RECORD,,