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.
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/PKG-INFO +1 -1
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/setup.py +1 -1
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy/main.py +7 -6
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy.egg-info/PKG-INFO +1 -1
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/README.md +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/setup.cfg +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy/__init__.py +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy.egg-info/SOURCES.txt +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy.egg-info/dependency_links.txt +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy.egg-info/requires.txt +0 -0
- {softhauzpy-0.0.4 → softhauzpy-0.0.5}/softhauzpy.egg-info/top_level.txt +0 -0
|
@@ -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
|
-
>>>
|
|
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
|
-
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|