webtoolkit 0.0.188__py3-none-any.whl → 0.0.190__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 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=DomainCache.default_cache_size,
196
+ cache_size=cache_size,
186
197
  url_builder=url_builder,
187
198
  )
188
199
 
189
- domain_url = UrlLocation(url).get_domain_only()
190
- return DomainCache.object.get_domain_info(domain_url)
200
+ return DomainCache.object
191
201
 
192
202
  def __init__(
193
203
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: webtoolkit
3
- Version: 0.0.188
3
+ Version: 0.0.190
4
4
  Summary: Web tools and interfaces for Internet data processing.
5
5
  License: GPL3
6
6
  Author: Iwan Grozny
@@ -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=qSfw3TuWI_7y30TNJs_KwJCAKOJH8Mo076n08ADXy80,6910
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.188.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
51
- webtoolkit-0.0.188.dist-info/METADATA,sha256=G8iw7cCdYZrDDRsBUBd31jm38773XcS3z_RdA9EBlA4,6743
52
- webtoolkit-0.0.188.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
53
- webtoolkit-0.0.188.dist-info/RECORD,,
50
+ webtoolkit-0.0.190.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
51
+ webtoolkit-0.0.190.dist-info/METADATA,sha256=IKsS_rETEu13IwHOtKwoD91hD1uY-8zo0yFhmXTMoy4,6743
52
+ webtoolkit-0.0.190.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
53
+ webtoolkit-0.0.190.dist-info/RECORD,,