vilarin commited on
Commit
9c2a268
·
verified ·
1 Parent(s): ba13ad9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -149,12 +149,12 @@ def generator(messages):
149
  return results
150
 
151
  def extract_content(text):
152
- """Extracts the JSON content from the given text."""
153
- match = re.search(r'\{.*?\}', 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://"):
 
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://"):