Update app.py
Browse files
app.py
CHANGED
@@ -149,12 +149,12 @@ def generator(messages):
|
|
149 |
return results
|
150 |
|
151 |
def extract_content(text):
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
|
159 |
async def main(link):
|
160 |
if not link.startswith("http://") and not link.startswith("https://"):
|
|
|
149 |
return results
|
150 |
|
151 |
def extract_content(text):
|
152 |
+
"""Extracts the JSON content from the given text."""
|
153 |
+
match = re.search(r'\{.*?\}\s*\{.*?\}', text, re.DOTALL)
|
154 |
+
if match:
|
155 |
+
return match.group(0)
|
156 |
+
else:
|
157 |
+
return None
|
158 |
|
159 |
async def main(link):
|
160 |
if not link.startswith("http://") and not link.startswith("https://"):
|