sonygod commited on
Commit
b7d6667
·
1 Parent(s): caca3bc

这个版本暂时无问题

Browse files
Files changed (1) hide show
  1. youtube_sub.js +3 -3
youtube_sub.js CHANGED
@@ -1266,9 +1266,9 @@ GM_addStyle(`
1266
  });
1267
 
1268
  const content = response.data.response;
1269
- // const jsonMatch = content.match(/```json\s*([\s\S]*?)\s*```/);
1270
- const jsonMatch = content.match(/(?:")?```json\s*([\s\S]*?)\s*```(?:")?/);
1271
-
1272
  if (!jsonMatch) {
1273
  throw new Error('No JSON content found in response');
1274
  }
 
1266
  });
1267
 
1268
  const content = response.data.response;
1269
+ const jsonMatch = content.match(/```json\s*([\s\S]*?)\s*(?:```|\.{3})/);
1270
+
1271
+
1272
  if (!jsonMatch) {
1273
  throw new Error('No JSON content found in response');
1274
  }