fix: 修复 Failed to fetch video data
- 修正正则匹配方法
This commit is contained in:
parent
2f635006ea
commit
042e66a777
@ -1,5 +1,11 @@
|
||||
# Vue 3 + Vite
|
||||
To install dependencies:
|
||||
```sh
|
||||
bun install
|
||||
```
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||
To run:
|
||||
```sh
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
||||
open http://localhost:5173
|
||||
|
||||
@ -62,7 +62,7 @@ app.post('/api/parse', async (c) => {
|
||||
return c.json({ error: 'Failed to fetch video data' }, 500)
|
||||
}
|
||||
const html = await response.text()
|
||||
const routerDataMatch = html.match(/_ROUTER_DATA\s*=\s*(\{.*?\});/)
|
||||
const routerDataMatch = html.match(/_ROUTER_DATA\s*=\s*(\{.*?\})</)
|
||||
if (!routerDataMatch) {
|
||||
return c.json({ error: 'Failed to extract router data' }, 500)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user