mirror of
https://github.com/Evil0ctal/Douyin_TikTok_Download_API.git
synced 2025-04-20 11:35:01 +08:00
🔧: Update to V4.0.9 -> #481
This commit is contained in:
parent
4f322212a9
commit
7d467ee269
@ -30,8 +30,8 @@ API:
|
|||||||
Redoc_URL: /redoc # API documentation URL | API文档URL
|
Redoc_URL: /redoc # API documentation URL | API文档URL
|
||||||
|
|
||||||
# API Information
|
# API Information
|
||||||
Version: V4.0.8 # API version | API版本
|
Version: V4.0.9 # API version | API版本
|
||||||
Update_Time: 2024/09/16 # API update time | API更新时间
|
Update_Time: 2024/09/25 # API update time | API更新时间
|
||||||
Environment: Demo # API environment | API环境
|
Environment: Demo # API environment | API环境
|
||||||
|
|
||||||
# Download Configuration
|
# Download Configuration
|
||||||
|
@ -1,3 +1,37 @@
|
|||||||
|
# ==============================================================================
|
||||||
|
# Copyright (C) 2021 Evil0ctal
|
||||||
|
#
|
||||||
|
# This file is part of the Douyin_TikTok_Download_API project.
|
||||||
|
#
|
||||||
|
# This project is licensed under the Apache License 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at:
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
# ==============================================================================
|
||||||
|
# __
|
||||||
|
# /> フ
|
||||||
|
# | _ _ l
|
||||||
|
# /` ミ_xノ
|
||||||
|
# / | Feed me Stars ⭐ ️
|
||||||
|
# / ヽ ノ
|
||||||
|
# │ | | |
|
||||||
|
# / ̄| | | |
|
||||||
|
# | ( ̄ヽ__ヽ_)__)
|
||||||
|
# \二つ
|
||||||
|
# ==============================================================================
|
||||||
|
#
|
||||||
|
# Contributor Link:
|
||||||
|
#
|
||||||
|
# - https://github.com/Koyomi781
|
||||||
|
#
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
import asyncio # 异步I/O
|
import asyncio # 异步I/O
|
||||||
import os # 系统操作
|
import os # 系统操作
|
||||||
import time # 时间操作
|
import time # 时间操作
|
||||||
@ -11,7 +45,6 @@ from crawlers.bilibili.web.utils import EndpointGenerator, bv2av, ResponseAnalyz
|
|||||||
# 数据请求模型
|
# 数据请求模型
|
||||||
from crawlers.bilibili.web.models import UserPostVideos, UserProfile, ComPopular, UserDynamic, PlayUrl
|
from crawlers.bilibili.web.models import UserPostVideos, UserProfile, ComPopular, UserDynamic, PlayUrl
|
||||||
|
|
||||||
|
|
||||||
# 配置文件路径
|
# 配置文件路径
|
||||||
path = os.path.abspath(os.path.dirname(__file__))
|
path = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
@ -38,6 +71,7 @@ class BilibiliWebCrawler:
|
|||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
"-------------------------------------------------------handler接口列表-------------------------------------------------------"
|
"-------------------------------------------------------handler接口列表-------------------------------------------------------"
|
||||||
|
|
||||||
# 获取单个视频详情信息
|
# 获取单个视频详情信息
|
||||||
async def fetch_one_video(self, bv_id: str) -> dict:
|
async def fetch_one_video(self, bv_id: str) -> dict:
|
||||||
# 获取请求头信息
|
# 获取请求头信息
|
||||||
@ -256,6 +290,7 @@ class BilibiliWebCrawler:
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
"-------------------------------------------------------utils接口列表-------------------------------------------------------"
|
"-------------------------------------------------------utils接口列表-------------------------------------------------------"
|
||||||
|
|
||||||
# 通过bv号获得视频aid号
|
# 通过bv号获得视频aid号
|
||||||
async def bv_to_aid(self, bv_id: str) -> int:
|
async def bv_to_aid(self, bv_id: str) -> int:
|
||||||
aid = await bv2av(bv_id=bv_id)
|
aid = await bv2av(bv_id=bv_id)
|
||||||
@ -288,9 +323,10 @@ class BilibiliWebCrawler:
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
"-------------------------------------------------------main-------------------------------------------------------"
|
"-------------------------------------------------------main-------------------------------------------------------"
|
||||||
async def main(self):
|
|
||||||
|
|
||||||
"-------------------------------------------------------handler接口列表-------------------------------------------------------"
|
async def main(self):
|
||||||
|
"""-------------------------------------------------------handler接口列表-------------------------------------------------------"""
|
||||||
|
|
||||||
# 获取单个作品数据
|
# 获取单个作品数据
|
||||||
# bv_id = 'BV1M1421t7hT'
|
# bv_id = 'BV1M1421t7hT'
|
||||||
# result = await self.fetch_one_video(bv_id=bv_id)
|
# result = await self.fetch_one_video(bv_id=bv_id)
|
||||||
@ -385,7 +421,6 @@ class BilibiliWebCrawler:
|
|||||||
# print(result)
|
# print(result)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# 初始化
|
# 初始化
|
||||||
BilibiliWebCrawler = BilibiliWebCrawler()
|
BilibiliWebCrawler = BilibiliWebCrawler()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user