cobweb-launcher 1.2.29__py3-none-any.whl → 1.2.31__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/crawlers/crawler.py +4 -3
- cobweb/utils/dotting.py +5 -4
- {cobweb_launcher-1.2.29.dist-info → cobweb_launcher-1.2.31.dist-info}/METADATA +1 -1
- {cobweb_launcher-1.2.29.dist-info → cobweb_launcher-1.2.31.dist-info}/RECORD +7 -7
- {cobweb_launcher-1.2.29.dist-info → cobweb_launcher-1.2.31.dist-info}/LICENSE +0 -0
- {cobweb_launcher-1.2.29.dist-info → cobweb_launcher-1.2.31.dist-info}/WHEEL +0 -0
- {cobweb_launcher-1.2.29.dist-info → cobweb_launcher-1.2.31.dist-info}/top_level.txt +0 -0
cobweb/crawlers/crawler.py
CHANGED
|
@@ -141,10 +141,11 @@ class Crawler(threading.Thread):
|
|
|
141
141
|
))
|
|
142
142
|
if isinstance(download_item, Response):
|
|
143
143
|
end_time = time.time()
|
|
144
|
-
self.loghub_dot.build(
|
|
145
|
-
"
|
|
144
|
+
self.loghub_dot.build(
|
|
145
|
+
topic=f"{self.project}:{self.task}",
|
|
146
|
+
cost_time=end_time - start_time,
|
|
146
147
|
**download_item.to_dict
|
|
147
|
-
|
|
148
|
+
)
|
|
148
149
|
parse_iterators = self.parse(download_item)
|
|
149
150
|
if not isgenerator(parse_iterators):
|
|
150
151
|
raise TypeError("parse function isn't a generator")
|
cobweb/utils/dotting.py
CHANGED
|
@@ -11,12 +11,13 @@ class LoghubDot:
|
|
|
11
11
|
super().__init__(*args, **kwargs)
|
|
12
12
|
self.client = LogClient(**setting.LOGHUB_CONFIG)
|
|
13
13
|
|
|
14
|
-
def build(self, topic,
|
|
14
|
+
def build(self, topic, **kwargs):
|
|
15
|
+
temp = {}
|
|
15
16
|
log_item = LogItem()
|
|
16
|
-
for key, value in
|
|
17
|
+
for key, value in kwargs.items():
|
|
17
18
|
if not isinstance(value, str):
|
|
18
|
-
|
|
19
|
-
contents = sorted(
|
|
19
|
+
temp[key] = json.dumps(value, ensure_ascii=False)
|
|
20
|
+
contents = sorted(temp.items())
|
|
20
21
|
log_item.set_contents(contents)
|
|
21
22
|
request = PutLogsRequest(
|
|
22
23
|
project="databee-download-log",
|
|
@@ -11,7 +11,7 @@ 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=msvkB9mTpsgyj8JfNMsmwAcpy5kWk_2NrO1Adw2Hkw0,29
|
|
13
13
|
cobweb/crawlers/base_crawler.py,sha256=ee_WSDnPQpPTk6wlFuY2UEx5L3hcsAZFcr6i3GLSry8,5751
|
|
14
|
-
cobweb/crawlers/crawler.py,sha256=
|
|
14
|
+
cobweb/crawlers/crawler.py,sha256=mPRc9GBfWi5AoSxB1jlARxvG_AzsPVRFil5O8RnOxCY,7018
|
|
15
15
|
cobweb/crawlers/file_crawler.py,sha256=2Sjbdgxzqd41WykKUQE3QQlGai3T8k-pmHNmPlTchjQ,4454
|
|
16
16
|
cobweb/db/__init__.py,sha256=uZwSkd105EAwYo95oZQXAfofUKHVIAZZIPpNMy-hm2Q,56
|
|
17
17
|
cobweb/db/api_db.py,sha256=bDc5dJQxq4z04h70KUTHd0OqUOEY7Cm3wcNJZtTvJIM,3015
|
|
@@ -31,7 +31,7 @@ cobweb/pipelines/pipeline_console.py,sha256=NEh-4zhuVAQOqwXLsqeb-rcNZ9_KXFUpL3ot
|
|
|
31
31
|
cobweb/pipelines/pipeline_loghub.py,sha256=xZ6D55BGdiM71WUv83jyLGbEyUwhBHLJRZoXthBxxTs,1019
|
|
32
32
|
cobweb/utils/__init__.py,sha256=Ev2LZZ1-S56iQYDqFZrqadizEv4Gk8Of-DraH-_WnKY,109
|
|
33
33
|
cobweb/utils/bloom.py,sha256=vng-YbKgh9HbtpAWYf_nkUSbfVTOj40aqUUejRYlsCU,1752
|
|
34
|
-
cobweb/utils/dotting.py,sha256=
|
|
34
|
+
cobweb/utils/dotting.py,sha256=dSxYOjqfMW9d3Z7CZx6RlJcAKNER0-mT8KgiPDm1_C8,827
|
|
35
35
|
cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
|
|
36
36
|
cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
|
37
37
|
cobweb_new/__init__.py,sha256=CBd2oByCfc5EmH2dCZYVHkxXYZG-oWrLyTtZU5sEoP0,96
|
|
@@ -67,8 +67,8 @@ cobweb_new/utils/__init__.py,sha256=c9macpjc15hrCUCdzO5RR_sgK_B9kvJKreSGprZ1ld4,
|
|
|
67
67
|
cobweb_new/utils/bloom.py,sha256=vng-YbKgh9HbtpAWYf_nkUSbfVTOj40aqUUejRYlsCU,1752
|
|
68
68
|
cobweb_new/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
|
|
69
69
|
cobweb_new/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
|
70
|
-
cobweb_launcher-1.2.
|
|
71
|
-
cobweb_launcher-1.2.
|
|
72
|
-
cobweb_launcher-1.2.
|
|
73
|
-
cobweb_launcher-1.2.
|
|
74
|
-
cobweb_launcher-1.2.
|
|
70
|
+
cobweb_launcher-1.2.31.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
71
|
+
cobweb_launcher-1.2.31.dist-info/METADATA,sha256=xanPaLf5XrEkR-njy3_EofcBSECfm1AaXGt5PHgtc7w,6510
|
|
72
|
+
cobweb_launcher-1.2.31.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
73
|
+
cobweb_launcher-1.2.31.dist-info/top_level.txt,sha256=UKwd478nkspJ6_fos3jtuc7SKXfmU42bJa_Ek5n2zsE,18
|
|
74
|
+
cobweb_launcher-1.2.31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|