lacuscore 1.12.2__tar.gz → 1.12.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lacuscore
3
- Version: 1.12.2
3
+ Version: 1.12.4
4
4
  Summary: Core of Lacus, usable as a module
5
5
  Home-page: https://github.com/ail-project/LacusCore
6
6
  License: BSD-3-Clause
@@ -29,8 +29,8 @@ Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; python_version < "3.11"
29
29
  Requires-Dist: defang (>=0.5.3,<0.6.0)
30
30
  Requires-Dist: dnspython (>=2.7.0,<3.0.0) ; python_version >= "3.9"
31
31
  Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0) ; python_version < "3.10"
32
- Requires-Dist: playwrightcapture[recaptcha] (>=1.27.1,<2.0.0)
33
- Requires-Dist: pydantic (>=2.9.2,<3.0.0)
32
+ Requires-Dist: playwrightcapture[recaptcha] (>=1.27.2,<2.0.0)
33
+ Requires-Dist: pydantic (>=2.10.1,<3.0.0)
34
34
  Requires-Dist: redis[hiredis] (>=5.2.0,<6.0.0)
35
35
  Requires-Dist: requests (>=2.32.3,<3.0.0)
36
36
  Requires-Dist: ua-parser (>=0.18.0,<0.19.0)
@@ -82,6 +82,7 @@ class LacusCore():
82
82
 
83
83
  :param redis_connector: Pre-configured connector to a redis instance.
84
84
  :param max_capture_time: If the capture takes more than that time, break (in seconds)
85
+ :param expire_results: The capture results are stored in redis. Expire them after they are done (in seconds).
85
86
  :param tor_proxy: URL to a SOCKS 5 tor proxy. If you have tor installed, this is the default: socks5://127.0.0.1:9050.
86
87
  :param only_global_lookups: Discard captures that point to non-public IPs.
87
88
  :param max_retries: How many times should we re-try a capture if it failed.
@@ -89,6 +90,7 @@ class LacusCore():
89
90
 
90
91
  def __init__(self, redis_connector: Redis[bytes], /, *,
91
92
  max_capture_time: int=3600,
93
+ expire_results: int=36000,
92
94
  tor_proxy: str | None=None,
93
95
  only_global_lookups: bool=True,
94
96
  max_retries: int=3,
@@ -97,6 +99,7 @@ class LacusCore():
97
99
  self.master_logger.setLevel(loglevel)
98
100
  self.redis = redis_connector
99
101
  self.max_capture_time = max_capture_time
102
+ self.expire_results = expire_results
100
103
  self.tor_proxy = tor_proxy
101
104
  self.only_global_lookups = only_global_lookups
102
105
  self.max_retries = max_retries
@@ -681,7 +684,7 @@ class LacusCore():
681
684
  if hash_to_set:
682
685
  pipeline.hset(root_key, mapping=hash_to_set) # type: ignore[arg-type]
683
686
  # Make sure the key expires
684
- pipeline.expire(root_key, 36000)
687
+ pipeline.expire(root_key, self.expire_results)
685
688
  else:
686
689
  logger.critical(f'Nothing to store (Hash: {hash_to_set}) for {root_key}')
687
690
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "lacuscore"
3
- version = "1.12.2"
3
+ version = "1.12.4"
4
4
  description = "Core of Lacus, usable as a module"
5
5
  authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
6
6
  license = "BSD-3-Clause"
@@ -34,13 +34,13 @@ Sphinx = [
34
34
  {version = "^7.2", python = ">=3.9,<3.10", optional = true},
35
35
  {version = "^8", python = ">=3.10", optional = true}
36
36
  ]
37
- playwrightcapture = {extras = ["recaptcha"], version = "^1.27.1"}
37
+ playwrightcapture = {extras = ["recaptcha"], version = "^1.27.2"}
38
38
  defang = "^0.5.3"
39
39
  ua-parser = "^0.18.0"
40
40
  redis = {version = "^5.2.0", extras = ["hiredis"]}
41
41
  dnspython = {version = "^2.7.0", python = ">=3.9"}
42
42
  async-timeout = {version = "^4.0.3", python = "<3.11"}
43
- pydantic = "^2.9.2"
43
+ pydantic = "^2.10.1"
44
44
  eval-type-backport = {version = "^0.2.0", python = "<3.10"}
45
45
 
46
46
  [tool.poetry.extras]
File without changes
File without changes