From 3646340dbc300e668af08b0c852a23dc2087374f Mon Sep 17 00:00:00 2001 From: theCyberTech <84775494+theCyberTech@users.noreply.github.com> Date: Sat, 7 Jun 2025 20:08:09 +0800 Subject: [PATCH] Fix typo in variable name stirng to string in search_tools.py - Corrected misspelled variable name 'stirng' to 'string' - This would have caused a NameError at runtime --- instagram_post/tools/search_tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instagram_post/tools/search_tools.py b/instagram_post/tools/search_tools.py index eeffabb1..5df0cfa9 100644 --- a/instagram_post/tools/search_tools.py +++ b/instagram_post/tools/search_tools.py @@ -29,16 +29,16 @@ class SearchTools(): } response = requests.request("POST", url, headers=headers, data=payload) results = response.json()['organic'] - stirng = [] + string = [] for result in results[:n_results]: try: - stirng.append('\n'.join([ + string.append('\n'.join([ f"Title: {result['title']}", f"Link: {result['link']}", f"Snippet: {result['snippet']}", "\n-----------------" ])) except KeyError: next - content = '\n'.join(stirng) + content = '\n'.join(string) return f"\nSearch result: {content}\n"