softhauzpy 0.0.4__tar.gz → 0.0.5__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: softhauzpy
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Author: Karen Urate
5
5
  Author-email: karen.urate@softhauz.ca
6
6
  Description-Content-Type: text/markdown
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as f:
5
5
 
6
6
  setup(
7
7
  name='softhauzpy',
8
- version='0.0.4',
8
+ version='0.0.5',
9
9
  author='Karen Urate',
10
10
  author_email='karen.urate@softhauz.ca',
11
11
  packages=find_packages(),
@@ -169,7 +169,7 @@ def extract_pure_text(
169
169
  ... ("https://example.com", "Example Page", "Alice", "A sample page", "2023-01-01", "2023-01-05"),
170
170
  ... ("https://another.com", "Another Page", "Bob", "Another sample page", "2023-02-01", "2023-02-05")
171
171
  ... ]
172
- >>> search_pages(pages, "sample")
172
+ >>> get_search_results_list(pages, "sample")
173
173
  [
174
174
  ("https://example.com", "Example Page", "Alice", "A sample page", "2023-01-01", "2023-01-05"),
175
175
  ("https://another.com", "Another Page", "Bob", "Another sample page", "2023-02-01", "2023-02-05")
@@ -178,8 +178,10 @@ def extract_pure_text(
178
178
 
179
179
 
180
180
  def get_search_results_list(page_list=[], keywords='') -> list:
181
- results = []
182
181
 
182
+ results = []
183
+ keywords = keywords.lower()
184
+
183
185
  for page in page_list:
184
186
 
185
187
  url = page[0]
@@ -192,14 +194,13 @@ def get_search_results_list(page_list=[], keywords='') -> list:
192
194
  description = page[3] or ''
193
195
  creation_date = page[4] or ''
194
196
  modified_date = page[5] or ''
195
-
196
- if keywords in extract_pure_text(url, title=title, author=author, description=description, creation_date=creation_date, modified_date=modified_date)["content"]:
197
+
198
+
199
+ if keywords in (extract_pure_text(url, title=title, author=author, description=description, creation_date=creation_date, modified_date=modified_date)["content"]).lower():
197
200
  results.append((url, title, author, description, creation_date, modified_date))
198
201
 
199
202
  return results
200
203
 
201
-
202
-
203
204
  """
204
205
  Fetch a single URL with retry logic and polite delay.
205
206
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: softhauzpy
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Author: Karen Urate
5
5
  Author-email: karen.urate@softhauz.ca
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes