Spaces:
Sleeping
Sleeping
Add small test for search
Browse files
search.py
CHANGED
@@ -76,3 +76,15 @@ class GoogleSearch:
|
|
76 |
return results
|
77 |
else:
|
78 |
return f"Search failed with status {response.status}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
return results
|
77 |
else:
|
78 |
return f"Search failed with status {response.status}"
|
79 |
+
|
80 |
+
|
81 |
+
async def main():
|
82 |
+
google_search = GoogleSearch()
|
83 |
+
results = await google_search.google_search("Fresident of Prance?")
|
84 |
+
print(results)
|
85 |
+
|
86 |
+
|
87 |
+
if __name__ == "__main__":
|
88 |
+
import asyncio
|
89 |
+
|
90 |
+
asyncio.run(main())
|