1212
1313
1414class SearchSource (BaseSource [SearchContent ]):
15- """
16- SearchSource provides a way to fetch content from search engines.
15+ """SearchSource provides a way to fetch content from search engines.
16+
1717 Currently, it uses DuckDuckGo as the search provider.
1818 """
1919
@@ -37,12 +37,12 @@ def search(
3737 start_date : Optional [str ] = None ,
3838 end_date : Optional [str ] = None ,
3939 ) -> List [SearchContent ]:
40- """
41- Performs a search query and returns a list of SearchContent objects.
40+ """Performs a search query and returns a list of SearchContent objects.
4241
4342 Args:
4443 query: The search query string.
45- max_results: The maximum number of results to return. Defaults to the value in the config.
44+ max_results: The maximum number of results to return. Defaults to
45+ the value in the config.
4646 site: Restrict search to a specific domain.
4747 filetype: Search for specific file types.
4848 start_date: Start date for search results (YYYY-MM-DD).
@@ -93,9 +93,10 @@ def search(
9393 return []
9494
9595 def get_by_id (self , content_id : str ) -> Optional [SearchContent ]:
96- """
97- Retrieves content by its ID (URL). This is not a standard use case for a search source,
98- but it's implemented for interface consistency. It performs a search for the URL.
96+ """Retrieves content by its ID (URL).
97+
98+ This is not a standard use case for a search source, but it's
99+ implemented for interface consistency. It performs a search for the URL.
99100
100101 Args:
101102 content_id: The URL of the content to retrieve.
0 commit comments