-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
66 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
|
||
type Data = { | ||
url: string; | ||
}; | ||
|
||
export default async function handler( | ||
req: NextApiRequest, | ||
res: NextApiResponse<Data> | ||
) { | ||
console.log("========b23.tv URL========", req.query); | ||
// https://b23.tv/MP6B0qw | ||
// @ts-ignore | ||
let response = await fetch(req.query.url); | ||
console.log("======response.url=======", response.url); | ||
res.status(200).json({ url: response.url }); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export function extractUrl(videoUrl: string) { | ||
const matchResult = videoUrl.match(/\/video\/([^\/\?]+)/); | ||
if (!matchResult) { | ||
return; | ||
} | ||
return matchResult[1]; | ||
} | ||
|
||
export function extractPage(currentVideoUrl: string, searchParams: URLSearchParams) { | ||
const queryString = currentVideoUrl.split("?")[1]; | ||
const urlParams = new URLSearchParams(queryString); | ||
return searchParams.get("p") || urlParams.get("p"); | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
32fcb3e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
chat-bilibili-video – ./
chat-bilibili-video.vercel.app
m.bilibili.jimmylv.cn
www.bilibili.jimmylv.cn
chat-bilibili-video-git-main-jimmylv.vercel.app
chat-bilibili-video-jimmylv.vercel.app
b.jimmylv.cn
www.youtube.jimmylv.cn
m.youtube.jimmylv.cn
bilibili.jimmylv.cn