Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

[Services] Add searxng and migrate to AbstractWebSearchService#1698

Closed
Herklos wants to merge 1 commit into
devfrom
feature/add-search-services
Closed

[Services] Add searxng and migrate to AbstractWebSearchService#1698
Herklos wants to merge 1 commit into
devfrom
feature/add-search-services

Conversation

@Herklos
Copy link
Copy Markdown
Contributor

@Herklos Herklos commented Jan 31, 2026

Requires #1693

@Herklos Herklos requested a review from GuillaumeDSM January 31, 2026 10:04
@Herklos Herklos self-assigned this Jan 31, 2026
@@ -0,0 +1,6 @@
{
"version": "1.0.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "1.0.0",
"version": "1.2.0",

return {}

try:
async with aiohttp.ClientSession() as session:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible, we should store this session somewhere to avoid re-creating it at every request

return {}
return await resp.json()
except aiohttp.ClientError as e:
if self.logger:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not check if self.logger exists

return await resp.json()
except aiohttp.ClientError as e:
if self.logger:
self.logger.error(f"SearXNG API request failed: {e}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.logger.error(f"SearXNG API request failed: {e}")
self.logger.exception(e, True, f"SearXNG API request failed: {e}")

(to get the traceback)

return {}
except Exception as e:
if self.logger:
self.logger.error(f"SearXNG API error: {e}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.logger.error(f"SearXNG API error: {e}")
self.logger.exception(e, True, f"SearXNG API error: {e}")

"""Get marketcap API URL"""
return f"https://data-api.coindesk.com/overview/v1/historical/marketcap/all/assets/days?limit={limit}&response_format=JSON"

async def _fetch_news_batch(self, session: aiohttp.ClientSession, limit: int = 1000) -> list:
Copy link
Copy Markdown
Member

@GuillaumeDSM GuillaumeDSM Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there is no call to this method (and it's private), I understand it will be used later, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I shouldn't have commit this function, it's used inside my social backtesting branch

@Herklos
Copy link
Copy Markdown
Contributor Author

Herklos commented Feb 3, 2026

Replaced by Drakkar-Software/OctoBot#3214

@Herklos Herklos closed this Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants