mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-20 05:08:00 +00:00
Update internet.py
This commit is contained in:
parent
93b1273cd9
commit
7424d7a960
@ -160,6 +160,11 @@ def scrape_and_save(url, file_path:str|Path=None, use_selenium=False, follow_lin
|
|||||||
md_file.write(text + '\n\n')
|
md_file.write(text + '\n\n')
|
||||||
print(f"Texts saved to {file_path}")
|
print(f"Texts saved to {file_path}")
|
||||||
print(f"Images saved to {images_folder}")
|
print(f"Images saved to {images_folder}")
|
||||||
|
if len(results['texts'])==0:
|
||||||
|
return {
|
||||||
|
'texts': ["Query returned no information. Please try to change the query."],
|
||||||
|
'image_urls': []
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'texts': results['texts'],
|
'texts': results['texts'],
|
||||||
|
Loading…
Reference in New Issue
Block a user