mirror of
https://github.com/TeamWiseFlow/wiseflow.git
synced 2025-02-02 18:28:46 +08:00
repair: issue#214
This commit is contained in:
parent
fdfe5c0ec8
commit
797d82f8dd
@ -92,6 +92,8 @@ async def main_process(focus: dict, sites: list):
|
||||
wiseflow_logger.info(f'query: {query}\nsearch intent: {_intent}\nkeywords: {_keywords}')
|
||||
search_results = search_content['search_result']
|
||||
for result in search_results:
|
||||
if 'content' not in result or 'link' not in result:
|
||||
continue
|
||||
url = result['link']
|
||||
if url in existing_urls:
|
||||
continue
|
||||
@ -111,7 +113,9 @@ async def main_process(focus: dict, sites: list):
|
||||
wiseflow_logger.warning(f'can not find publish time in the search result {url}, adding to working list')
|
||||
working_list.add(url)
|
||||
continue
|
||||
author = result['media']
|
||||
author = result.get('media', '')
|
||||
if not author:
|
||||
author = urlparse(url).netloc
|
||||
texts = [result['content']]
|
||||
await info_process(url, title, author, publish_date, texts, {}, focus_id, get_info_prompts)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user