webtoolkit 0.0.187__py3-none-any.whl → 0.0.189__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.
- webtoolkit/domaincache.py +15 -5
- {webtoolkit-0.0.187.dist-info → webtoolkit-0.0.189.dist-info}/METADATA +1 -1
- {webtoolkit-0.0.187.dist-info → webtoolkit-0.0.189.dist-info}/RECORD +5 -5
- {webtoolkit-0.0.187.dist-info → webtoolkit-0.0.189.dist-info}/LICENSE +0 -0
- {webtoolkit-0.0.187.dist-info → webtoolkit-0.0.189.dist-info}/WHEEL +0 -0
webtoolkit/domaincache.py
CHANGED
|
@@ -177,17 +177,27 @@ class DomainCache(object):
|
|
|
177
177
|
|
|
178
178
|
def get_object(url, url_builder):
|
|
179
179
|
"""
|
|
180
|
-
API
|
|
180
|
+
API - returns information about url
|
|
181
181
|
"""
|
|
182
182
|
|
|
183
|
+
domain = DomainCache.get(url_builder=url_builder)
|
|
184
|
+
domain_url = UrlLocation(url).get_domain_only()
|
|
185
|
+
return domain.get_domain_info(domain_url)
|
|
186
|
+
|
|
187
|
+
def get(url_builder=None, cache_size=400):
|
|
188
|
+
"""
|
|
189
|
+
API - Returns domain cache object
|
|
190
|
+
"""
|
|
183
191
|
if DomainCache.object is None:
|
|
192
|
+
if not cache_size:
|
|
193
|
+
cache_size=DomainCache.default_cache_size
|
|
194
|
+
|
|
184
195
|
DomainCache.object = DomainCache(
|
|
185
|
-
cache_size=
|
|
196
|
+
cache_size=cache_size,
|
|
186
197
|
url_builder=url_builder,
|
|
187
198
|
)
|
|
188
199
|
|
|
189
|
-
|
|
190
|
-
return DomainCache.object.get_domain_info(domain_url)
|
|
200
|
+
return DomainCache.object
|
|
191
201
|
|
|
192
202
|
def __init__(
|
|
193
203
|
self,
|
|
@@ -222,7 +232,7 @@ class DomainCache(object):
|
|
|
222
232
|
"""
|
|
223
233
|
Returns length of cache
|
|
224
234
|
"""
|
|
225
|
-
return self.cache_size
|
|
235
|
+
return self.cache_size
|
|
226
236
|
|
|
227
237
|
def read_info(self, domain_url):
|
|
228
238
|
return DomainCacheInfo(
|
|
@@ -7,7 +7,7 @@ webtoolkit/contenttext.py,sha256=RtBeMxI3WMupnaFY6IEwc3d91wwfjAqEJZh91xnEIhU,264
|
|
|
7
7
|
webtoolkit/crawlers/__init__.py,sha256=XlfTgcoNZLY4ZAbj__wSlU_TuIULSAQ9M93vK88jWps,170
|
|
8
8
|
webtoolkit/crawlers/crawlerinterface.py,sha256=wyHVz5d7ZvRE2U5F-j8ctCgzLpo0DpB4WAP9pK2TcwU,5429
|
|
9
9
|
webtoolkit/crawlers/requestscrawler.py,sha256=za1u03lzqcPBRRUHnf9g2TkB-YT22REO1twp6Bo0o4M,9987
|
|
10
|
-
webtoolkit/domaincache.py,sha256=
|
|
10
|
+
webtoolkit/domaincache.py,sha256=5GnkojZbD4cHS7rQK1gRofrYI_jMCTNS96lIp99i-j8,7206
|
|
11
11
|
webtoolkit/handlers/__init__.py,sha256=hsxn22rgIteDMcyq64lvRd-YEsFK_ZIxt00TDEcPbC4,346
|
|
12
12
|
webtoolkit/handlers/defaulturlhandler.py,sha256=jYz7ulPrzXaMoUKpQXdGQH-nQusP7U_Wt5KBdhXyFlw,8497
|
|
13
13
|
webtoolkit/handlers/handlerchannelodysee.py,sha256=dwYBx91-9EEzMqwb-pwuqJTxd-DSGFu3QmF7QI193e0,3063
|
|
@@ -47,7 +47,7 @@ webtoolkit/utils/dateutils.py,sha256=chHpgKdqn2q03m142SPSog2aAjaUhWNNRUQgQydOZe0
|
|
|
47
47
|
webtoolkit/utils/logger.py,sha256=SL6IYki4LPBxBQnUgyQo_qAf8ekNnvi8CiumyU4K_98,4681
|
|
48
48
|
webtoolkit/webconfig.py,sha256=5fM9CTwzsUcIqm162aT2tPgYlpADnHGl8SGvZbH8U4I,4174
|
|
49
49
|
webtoolkit/webtools.py,sha256=O-Qg7tJJxutvuiqSiJsKd8E7CdserkDAskqvh0u9D28,11845
|
|
50
|
-
webtoolkit-0.0.
|
|
51
|
-
webtoolkit-0.0.
|
|
52
|
-
webtoolkit-0.0.
|
|
53
|
-
webtoolkit-0.0.
|
|
50
|
+
webtoolkit-0.0.189.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
51
|
+
webtoolkit-0.0.189.dist-info/METADATA,sha256=i8-SHsp4uNWPydqxTeOHqs2Cnofi50z0-khIoPd9kho,6743
|
|
52
|
+
webtoolkit-0.0.189.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
53
|
+
webtoolkit-0.0.189.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|