cobweb-launcher 1.1.16__py3-none-any.whl → 1.1.17__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.
- cobweb/base/seed.py +5 -1
- cobweb/crawlers/base_crawler.py +2 -2
- cobweb/launchers/launcher_pro.py +1 -1
- cobweb/setting.py +1 -1
- {cobweb_launcher-1.1.16.dist-info → cobweb_launcher-1.1.17.dist-info}/METADATA +1 -1
- {cobweb_launcher-1.1.16.dist-info → cobweb_launcher-1.1.17.dist-info}/RECORD +9 -9
- {cobweb_launcher-1.1.16.dist-info → cobweb_launcher-1.1.17.dist-info}/LICENSE +0 -0
- {cobweb_launcher-1.1.16.dist-info → cobweb_launcher-1.1.17.dist-info}/WHEEL +0 -0
- {cobweb_launcher-1.1.16.dist-info → cobweb_launcher-1.1.17.dist-info}/top_level.txt +0 -0
cobweb/base/seed.py
CHANGED
|
@@ -5,10 +5,11 @@ import hashlib
|
|
|
5
5
|
|
|
6
6
|
class SeedParams:
|
|
7
7
|
|
|
8
|
-
def __init__(self, retry, priority, seed_version):
|
|
8
|
+
def __init__(self, retry, priority, seed_version, seed_status=None):
|
|
9
9
|
self.retry = retry or 0
|
|
10
10
|
self.priority = priority or 300
|
|
11
11
|
self.seed_version = seed_version or int(time.time())
|
|
12
|
+
self.seed_status = seed_status
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class Seed:
|
|
@@ -17,6 +18,7 @@ class Seed:
|
|
|
17
18
|
"retry",
|
|
18
19
|
"priority",
|
|
19
20
|
"seed_version",
|
|
21
|
+
"seed_status"
|
|
20
22
|
]
|
|
21
23
|
|
|
22
24
|
def __init__(
|
|
@@ -26,6 +28,7 @@ class Seed:
|
|
|
26
28
|
retry=None,
|
|
27
29
|
priority=None,
|
|
28
30
|
seed_version=None,
|
|
31
|
+
seed_status=None,
|
|
29
32
|
**kwargs
|
|
30
33
|
):
|
|
31
34
|
if any(isinstance(seed, t) for t in (str, bytes)):
|
|
@@ -47,6 +50,7 @@ class Seed:
|
|
|
47
50
|
"retry": retry,
|
|
48
51
|
"priority": priority,
|
|
49
52
|
"seed_version": seed_version,
|
|
53
|
+
"seed_status": seed_status,
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
if kwargs:
|
cobweb/crawlers/base_crawler.py
CHANGED
|
@@ -56,7 +56,7 @@ class Crawler(threading.Thread):
|
|
|
56
56
|
elif isinstance(item, str) and item == DealModel.done:
|
|
57
57
|
self.launcher_queue['done'].push(seed)
|
|
58
58
|
elif isinstance(item, str) and item == DealModel.fail:
|
|
59
|
-
seed.
|
|
59
|
+
seed.params.seed_status = DealModel.fail
|
|
60
60
|
self.launcher_queue['done'].push(seed)
|
|
61
61
|
else:
|
|
62
62
|
raise TypeError("yield value type error!")
|
|
@@ -69,7 +69,7 @@ class Crawler(threading.Thread):
|
|
|
69
69
|
continue
|
|
70
70
|
|
|
71
71
|
elif seed.params.retry >= self.max_retries:
|
|
72
|
-
seed.identifier = DealModel.fail
|
|
72
|
+
seed.params.identifier = DealModel.fail
|
|
73
73
|
self.launcher_queue['done'].push(seed)
|
|
74
74
|
continue
|
|
75
75
|
|
cobweb/launchers/launcher_pro.py
CHANGED
|
@@ -117,7 +117,7 @@ class LauncherPro(Launcher):
|
|
|
117
117
|
seed = self.__LAUNCHER_QUEUE__['done'].pop()
|
|
118
118
|
if not seed:
|
|
119
119
|
break
|
|
120
|
-
if seed.
|
|
120
|
+
if seed.params.seed_status == DealModel.fail:
|
|
121
121
|
f_seeds.append(seed.to_string)
|
|
122
122
|
elif self._done_model == 1:
|
|
123
123
|
s_seeds.append(seed.to_string)
|
cobweb/setting.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cobweb/__init__.py,sha256=1vB4yfJvrBVnixRRVNHLrJm8L0l5p_zOzLol5vKwP9M,80
|
|
2
2
|
cobweb/constant.py,sha256=dMzvtsPje_5VgtMoOn-EvDtgycUWTKBKmDzX-CDfHDY,2025
|
|
3
|
-
cobweb/setting.py,sha256=
|
|
3
|
+
cobweb/setting.py,sha256=bg_oO85xsxwKqNUJScoVUI2v4e2lzSNOpsoW0tIaOrg,1953
|
|
4
4
|
cobweb/base/__init__.py,sha256=diiK5MygQaWjlWNLbW6eUIg-93O6glMGC9WLNM5jyOc,209
|
|
5
5
|
cobweb/base/common_queue.py,sha256=W7PPZZFl52j3Mc916T0imHj7oAUelA6aKJwW-FecDPE,872
|
|
6
6
|
cobweb/base/decorators.py,sha256=wDCaQ94aAZGxks9Ljc0aXq6omDXT1_yzFy83ZW6VbVI,930
|
|
@@ -8,9 +8,9 @@ cobweb/base/item.py,sha256=pMriHStzUXtSvIf5Z3KXsP-bCvjlG1gM3z33wWeuoH8,966
|
|
|
8
8
|
cobweb/base/log.py,sha256=L01hXdk3L2qEm9X1FOXQ9VmWIoHSELe0cyZvrdAN61A,2003
|
|
9
9
|
cobweb/base/request.py,sha256=tEkgMVUfdQI-kZuzWuiit9P_q4Q9-_RZh9aXXpc0314,2352
|
|
10
10
|
cobweb/base/response.py,sha256=eB1DWMXFCpn3cJ3yzgCRU1WeZAdayGDohRgdjdMUFN4,406
|
|
11
|
-
cobweb/base/seed.py,sha256=
|
|
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=
|
|
13
|
+
cobweb/crawlers/base_crawler.py,sha256=X7RdgKCcMcYI8NSyGVXdT03uP9uHsEiX137IeBlkg00,5189
|
|
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
|
|
@@ -18,15 +18,15 @@ cobweb/exceptions/__init__.py,sha256=E9SHnJBbhD7fOgPFMswqyOf8SKRDrI_i25L0bSpohvk
|
|
|
18
18
|
cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BXApgrOYpA,636
|
|
19
19
|
cobweb/launchers/__init__.py,sha256=qwlkEJVri7dvCgi45aX3lqAmQS0HrPicAipDvH75kew,69
|
|
20
20
|
cobweb/launchers/launcher.py,sha256=LQdlpaF4fafEX01_3B9CB6hD-6YMPag6QOGl9rDprNE,5707
|
|
21
|
-
cobweb/launchers/launcher_pro.py,sha256=
|
|
21
|
+
cobweb/launchers/launcher_pro.py,sha256=lBHj5OaLNRbHwohI3tRRL3WZQ0uOolZAb8HdoTftq40,6594
|
|
22
22
|
cobweb/pipelines/__init__.py,sha256=xanY-Z1d7zRR5JhCdW2htzrAywnKBkigiaUlTFa6of0,80
|
|
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
26
|
cobweb/utils/oss.py,sha256=qAl05ybL2Jp6KFjHDHVMfmeBHQmDKPtZleHjHAY7LZc,3277
|
|
27
27
|
cobweb/utils/tools.py,sha256=bVd3iRGBvwhohQAH7AXTTjbmQ54Z35K0O-fatEyhePU,1249
|
|
28
|
-
cobweb_launcher-1.1.
|
|
29
|
-
cobweb_launcher-1.1.
|
|
30
|
-
cobweb_launcher-1.1.
|
|
31
|
-
cobweb_launcher-1.1.
|
|
32
|
-
cobweb_launcher-1.1.
|
|
28
|
+
cobweb_launcher-1.1.17.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
29
|
+
cobweb_launcher-1.1.17.dist-info/METADATA,sha256=j-Mf27c0yJOKyZWxGEg3nOvWJE2fQaKZnyB6-MBEMis,1246
|
|
30
|
+
cobweb_launcher-1.1.17.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
31
|
+
cobweb_launcher-1.1.17.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
32
|
+
cobweb_launcher-1.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|