crawlo 1.0.6__py3-none-any.whl → 1.0.7__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 crawlo might be problematic. Click here for more details.
- crawlo/__version__.py +1 -1
- crawlo/items/__init__.py +2 -1
- crawlo/items/base.py +1 -10
- {crawlo-1.0.6.dist-info → crawlo-1.0.7.dist-info}/METADATA +1 -1
- {crawlo-1.0.6.dist-info → crawlo-1.0.7.dist-info}/RECORD +8 -8
- {crawlo-1.0.6.dist-info → crawlo-1.0.7.dist-info}/WHEEL +0 -0
- {crawlo-1.0.6.dist-info → crawlo-1.0.7.dist-info}/entry_points.txt +0 -0
- {crawlo-1.0.6.dist-info → crawlo-1.0.7.dist-info}/top_level.txt +0 -0
crawlo/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.7"
|
crawlo/items/__init__.py
CHANGED
|
@@ -5,9 +5,10 @@ crawlo.items 包
|
|
|
5
5
|
===============
|
|
6
6
|
提供 Item 和 Field 类用于数据定义和验证。
|
|
7
7
|
"""
|
|
8
|
-
from .fields import Field
|
|
9
8
|
from .items import Item
|
|
9
|
+
from .fields import Field
|
|
10
10
|
from .base import ItemMeta
|
|
11
|
+
|
|
11
12
|
from crawlo.exceptions import ItemInitError, ItemAttributeError
|
|
12
13
|
|
|
13
14
|
__all__ = [
|
crawlo/items/base.py
CHANGED
|
@@ -4,28 +4,19 @@
|
|
|
4
4
|
基础元类定义
|
|
5
5
|
"""
|
|
6
6
|
from abc import ABCMeta
|
|
7
|
-
|
|
8
|
-
from crawlo.items import Field
|
|
9
|
-
|
|
7
|
+
from .fields import Field
|
|
10
8
|
|
|
11
9
|
class ItemMeta(ABCMeta):
|
|
12
|
-
"""
|
|
13
|
-
元类,用于自动收集 Item 类中的 Field 定义
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
10
|
def __new__(mcs, name, bases, attrs):
|
|
17
11
|
fields = {}
|
|
18
12
|
cls_attrs = {}
|
|
19
13
|
|
|
20
|
-
# 收集所有 Field 实例
|
|
21
14
|
for attr_name, attr_value in attrs.items():
|
|
22
15
|
if isinstance(attr_value, Field):
|
|
23
16
|
fields[attr_name] = attr_value
|
|
24
17
|
else:
|
|
25
18
|
cls_attrs[attr_name] = attr_value
|
|
26
19
|
|
|
27
|
-
# 创建类实例
|
|
28
20
|
cls_instance = super().__new__(mcs, name, bases, cls_attrs)
|
|
29
21
|
cls_instance.FIELDS = fields
|
|
30
|
-
|
|
31
22
|
return cls_instance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
crawlo/__init__.py,sha256=xpiIAZbSG3CzneJuDLPCbwfRcvw2wyHYl2kJjaNfNGY,584
|
|
2
|
-
crawlo/__version__.py,sha256=
|
|
2
|
+
crawlo/__version__.py,sha256=xYbb67T0bE-s3OjgVTmJzJVvjxFP4YEjxAaBB2nj3zA,23
|
|
3
3
|
crawlo/cli.py,sha256=hjAJKx9pba375sATvvcy-dtZyBIgXj8fRBq9RFIZHA4,1206
|
|
4
4
|
crawlo/crawler.py,sha256=nfuA_f8QnuIp2F4ZbaJv8Fceo_QPwqV1jYdD_edkMjg,8527
|
|
5
5
|
crawlo/event.py,sha256=ZhoPW5CglCEuZNFEwviSCBIw0pT5O6jT98bqYrDFd3E,324
|
|
@@ -26,8 +26,8 @@ crawlo/extension/logging_extension.py,sha256=rty2_up53KV05nCazuBuz2ZapHKq0ti7mGV
|
|
|
26
26
|
crawlo/filters/__init__.py,sha256=9fJQRVkxWWPChajYbAGe1O6UYB639xWt0hiLUGBs4hQ,1014
|
|
27
27
|
crawlo/filters/aioredis_filter.py,sha256=phBFW9Z28oylbik9Kb2WHM65Wo5yRAH2w9Yz0_2HaOQ,5621
|
|
28
28
|
crawlo/filters/memory_filter.py,sha256=L8XEJkObOxs4BzYpQvk9PVM969k2LE61VFsnEOTEf_E,6841
|
|
29
|
-
crawlo/items/__init__.py,sha256=
|
|
30
|
-
crawlo/items/base.py,sha256=
|
|
29
|
+
crawlo/items/__init__.py,sha256=rFpx1qFBo0Ik7bSdnXC8EVTJUOQdoJYGVdhYjaH00nk,409
|
|
30
|
+
crawlo/items/base.py,sha256=hwGJEdFWOdaZfalFX8umRkh_HUWLEbCjvq4j70fplMQ,598
|
|
31
31
|
crawlo/items/fields.py,sha256=fpS0vlRPpZYjTaMDgI9Q8z_YQqruwf6fi4Dgm6R2oEk,1854
|
|
32
32
|
crawlo/items/items.py,sha256=OmVEvMmgofMU95GkaiWkfNQ2fjsH2fY9sw3SKcmUhLs,3478
|
|
33
33
|
crawlo/middleware/__init__.py,sha256=PSwpRLdBUopaQzBp1S0zK_TZbrRagQ4yzvgyLy4tBk8,570
|
|
@@ -87,8 +87,8 @@ tests/test_proxy_middleware_integration.py,sha256=mTPK_XvbmLCV_QoVZzA3ybWOOX6149
|
|
|
87
87
|
tests/test_proxy_providers.py,sha256=u_R2fhab90vqvQEaOAztpAOe9tJXvUMIdoDxmStmXJ4,1749
|
|
88
88
|
tests/test_proxy_stats.py,sha256=ES00CEoDITYPFBGPk8pecFzD3ItYIv6NSpcqNd8-kvo,526
|
|
89
89
|
tests/test_proxy_strategies.py,sha256=9Z1pXmTNyw-eIhGXlf2abZbJx6igLohYq-_3hldQ5uE,1868
|
|
90
|
-
crawlo-1.0.
|
|
91
|
-
crawlo-1.0.
|
|
92
|
-
crawlo-1.0.
|
|
93
|
-
crawlo-1.0.
|
|
94
|
-
crawlo-1.0.
|
|
90
|
+
crawlo-1.0.7.dist-info/METADATA,sha256=ZjDus84i4MbVr_-7BEStA2OmZHEGcdw-b1MGUosylOI,1825
|
|
91
|
+
crawlo-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
92
|
+
crawlo-1.0.7.dist-info/entry_points.txt,sha256=5HoVoTSPxI8SCa5B7pQYxLSrkOdiunyO9tqNsLMv52g,43
|
|
93
|
+
crawlo-1.0.7.dist-info/top_level.txt,sha256=keG_67pbZ_wZL2dmDRA9RMaNHTaV_x_oxZ9DKNgwvR0,22
|
|
94
|
+
crawlo-1.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|