diff --git a/README.en.md b/README.en.md index 218d042..2f67d4e 100644 --- a/README.en.md +++ b/README.en.md @@ -17,18 +17,121 @@ Disclaimer: This project is only for learning and communication, not for commerc ## api -### Tik Tok -* Fetch the original URL `/api/dy/originalUrlFetch` -* Fetch live room information `/api/dy/fetchLiveRoomInfo` -* General search `/api/dy/generalSearch` -* Video Search `/api/dy/videoSearch` -* topic search `/api/dy/topicSearch` -* Get user video list `/api/dy/getUserVideos` -* Get user information `/api/dy/getUserInfo` -* Get user comments `/api/dy/getVideoComments` -* Get video information `/api/dy/getVideoDetail` - -Note: For other interfaces that need to pass parameters, you can often call `Fetch the original URL` to get the corresponding link. For example, if you need to pass the video id to get video comments, you can convert the video link to the original link to get the video id. +### Douyin +* Get the original URL `/api/dy/originalUrlFetch` `POST` +* Get live room information `/api/dy/fetchLiveRoomInfo` `POST` +* General search `/api/dy/generalSearch` `GET` +* Video search `/api/dy/videoSearch` `GET` +* Topic search `/api/dy/topicSearch` `GET` +* Get user video list `/api/dy/getUserVideos` `GET` +* Get user information `/api/dy/getUserInfo` `GET` +* Get user comments `/api/dy/getVideoComments` `GET` +* Get video information `/api/dy/getVideoDetail` `GET` + +Note: For other interfaces that need to pass parameters, you can often call `Get Original Link` to get the corresponding link. For example, if you need to pass the video id to get video comments, you can convert the video link to the original link to get the video id. + + +## example + +BASE_URL: `http://localhost:3000` + +### Douyin + +#### Get original link + +* **Request address**: `/api/dy/originalUrlFetch` +* **Request method**: `POST` +* **Request parameter**: `json` + +```json +{ + "share_info": "2.00 OxF:/ Xiaohe just showed her sharp corners~ https://v.douyin.com/iVsR2SK/ Copy this link, open Douyin search, and watch the video directly!" +} +``` + +* Response parameters: `json` + +```json +{ + "code": 200, + "msg": "success", + "data": { + "original_url": "https://www.iesdouyin.com/share/video/7257768974631374115/?region=CN&mid=6984719806654089992&u_code=0&did=MS4wLjABAAAAbqVwCUBSDPsPpMvTx0vOuEduviBhgeXBDDMB qJYrSpkKOz8kHRuu7fVYM11smy75&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=rIjKXqSq7BmP1zv22aQW8o Wg.6HvSSBDPJhgiH4LmIg-&share_version=170400&ts=1689845499&from_ssr=1&from=web_code_link" + } +} +``` + +--- + +#### Get live room information + +* **Request address**: `/api/dy/fetchLiveRoomInfo` +* **Request method**: `POST` +* **Request parameter**: `json` + +```json +{ + "live_url": "https://v.douyin.com/kD1pKKR" +} +``` + +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Comprehensive Search + +* **Request Address**: `/api/dy/generalSearch?keyword=Shaanxi Culture&sort_type=0&publish_time=0&offset=0&count=10` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Video Search + +* **Request Address**: `/api/dy/videoSearch?keyword=Shaanxi Culture&sort_type=0&publish_time=0&offset=0&count=10` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Topic Search + +* **Request Address**: `/api/dy/topicSearch?keyword=Shaanxi Culture&sort_type=0&publish_time=0&offset=0&count=10` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Get user homepage video list + +* **Request address**: `/api/dy/getUserVideos?sec_uid=MS4wLjABAAAA5qMD8Gzdcgq7HXUOviKB59i0-ybJ59jJvNzyaPt5XOsVNqP6DU7WLcoAXvdxvYdp&count=15&max_cursor=0` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Get user information + +* **Request address**: `/api/dy/getUserInfo?sec_uid=MS4wLjABAAAA5qMD8Gzdcgq7HXUOviKB59i0-ybJ59jJvNzyaPt5XOsVNqP6DU7WLcoAXvdxvYdp` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Get Video Comments + +* **Request Address**: `/api/dy/getVideoComments?aweme_id=6958148148680857863&count=20&cursor=0` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) + +--- + +#### Get video details + +* **Request URL**: `/api/dy/getVideoDetail?aweme_id=7055666575176781069` +* **Request method**: `GET` +* **Response parameter**: `json` (the content is too long, not shown here) ## deployment @@ -93,7 +196,7 @@ The above copyright notice and this permission notice shall be included on all c ## Links -[FirRock](http://vproctol.zeed.ink/) 提供免费稳定的服务支持,再次特别感谢! +[FirRock](http://vproctol.zeed.ink/) Provide free and stable service support, thank you again! ## Remark diff --git a/README.md b/README.md index 468ea28..3ea0985 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,121 @@ Video-Parser 的目标是解析海内外主流视频网站的视频地址,目 ## 接口 ### 抖音 -* 获取原始链接 `/api/dy/originalUrlFetch` -* 获取直播间信息 `/api/dy/fetchLiveRoomInfo` -* 综合搜索 `/api/dy/generalSearch` -* 视频搜索 `/api/dy/videoSearch` -* 话题搜索 `/api/dy/topicSearch` -* 获取用户视频列表 `/api/dy/getUserVideos` -* 获取用户信息 `/api/dy/getUserInfo` -* 获取用户评论 `/api/dy/getVideoComments` -* 获取视频信息 `/api/dy/getVideoDetail` +* 获取原始链接 `/api/dy/originalUrlFetch` `POST` +* 获取直播间信息 `/api/dy/fetchLiveRoomInfo` `POST` +* 综合搜索 `/api/dy/generalSearch` `GET` +* 视频搜索 `/api/dy/videoSearch` `GET` +* 话题搜索 `/api/dy/topicSearch` `GET` +* 获取用户视频列表 `/api/dy/getUserVideos` `GET` +* 获取用户信息 `/api/dy/getUserInfo` `GET` +* 获取用户评论 `/api/dy/getVideoComments` `GET` +* 获取视频信息 `/api/dy/getVideoDetail` `GET` 说明:其他接口需要传的参数往往可以调用`获取原始链接`获取相应的链接,如获取视频评论需要传视频id,可以将视频链接转换原始链接获取视频id。 + +## 例子 + +BASE_URL: `http://localhost:3000` + +### 抖音 + +#### 获取原始链接 + +* **请求地址**:`/api/dy/originalUrlFetch` +* **请求方式**:`POST` +* **请求参数**:`json` + +```json +{ + "share_info": "2.00 OxF:/ 小荷才露尖尖角~ https://v.douyin.com/iVsR2SK/ 复制此链接,打开Dou音搜索,直接观看视频!" +} +``` + +* 响应参数:`json` + +```json +{ + "code": 200, + "msg": "success", + "data": { + "original_url": "https://www.iesdouyin.com/share/video/7257768974631374115/?region=CN&mid=6984719806654089992&u_code=0&did=MS4wLjABAAAAbqVwCUBSDPsPpMvTx0vOuEduviBhgeXBDDMBqJYrSpkKOz8kHRuu7fVYM11smy75&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=rIjKXqSq7BmP1zv22aQW8oWg.6HvSSBDPJhgiH4LmIg-&share_version=170400&ts=1689845499&from_ssr=1&from=web_code_link" + } +} +``` + +--- + +#### 获取直播间信息 + +* **请求地址**:`/api/dy/fetchLiveRoomInfo` +* **请求方式**:`POST` +* **请求参数**:`json` + +```json +{ + "live_url": "https://v.douyin.com/kD1pKKR" +} +``` + +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 综合搜索 + +* **请求地址**:`/api/dy/generalSearch?keyword=陕西文化&sort_type=0&publish_time=0&offset=0&count=10` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 视频搜索 + +* **请求地址**:`/api/dy/videoSearch?keyword=陕西文化&sort_type=0&publish_time=0&offset=0&count=10` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 话题搜索 + +* **请求地址**:`/api/dy/topicSearch?keyword=陕西文化&sort_type=0&publish_time=0&offset=0&count=10` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 获取用户主页视频列表 + +* **请求地址**:`/api/dy/getUserVideos?sec_uid=MS4wLjABAAAA5qMD8Gzdcgq7HXUOviKB59i0-ybJ59jJvNzyaPt5XOsVNqP6DU7WLcoAXvdxvYdp&count=15&max_cursor=0` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 获取用户信息 + +* **请求地址**:`/api/dy/getUserInfo?sec_uid=MS4wLjABAAAA5qMD8Gzdcgq7HXUOviKB59i0-ybJ59jJvNzyaPt5XOsVNqP6DU7WLcoAXvdxvYdp` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 获取视频评论 + +* **请求地址**:`/api/dy/getVideoComments?aweme_id=6958148148680857863&count=20&cursor=0` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + +--- + +#### 获取视频详情 + +* **请求地址**:`/api/dy/getVideoDetail?aweme_id=7055666575176781069` +* **请求方式**:`GET` +* **响应参数**:`json` (内容太长,此处不展示) + ## 部署 说明: