🔧: Update to V4.0.9 -> #481

This commit is contained in:
Evil0ctal 2024-09-25 20:30:42 -07:00
parent 4f322212a9
commit 7d467ee269
2 changed files with 48 additions and 13 deletions

View File

@ -30,8 +30,8 @@ API:
Redoc_URL: /redoc # API documentation URL | API文档URL
# API Information
Version: V4.0.8 # API version | API版本
Update_Time: 2024/09/16 # API update time | API更新时间
Version: V4.0.9 # API version | API版本
Update_Time: 2024/09/25 # API update time | API更新时间
Environment: Demo # API environment | API环境
# Download Configuration

View File

@ -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 os # 系统操作
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
# 配置文件路径
path = os.path.abspath(os.path.dirname(__file__))
@ -38,6 +71,7 @@ class BilibiliWebCrawler:
return kwargs
"-------------------------------------------------------handler接口列表-------------------------------------------------------"
# 获取单个视频详情信息
async def fetch_one_video(self, bv_id: str) -> dict:
# 获取请求头信息
@ -256,6 +290,7 @@ class BilibiliWebCrawler:
return response
"-------------------------------------------------------utils接口列表-------------------------------------------------------"
# 通过bv号获得视频aid号
async def bv_to_aid(self, bv_id: str) -> int:
aid = await bv2av(bv_id=bv_id)
@ -288,9 +323,10 @@ class BilibiliWebCrawler:
return response
"-------------------------------------------------------main-------------------------------------------------------"
async def main(self):
"-------------------------------------------------------handler接口列表-------------------------------------------------------"
async def main(self):
"""-------------------------------------------------------handler接口列表-------------------------------------------------------"""
# 获取单个作品数据
# bv_id = 'BV1M1421t7hT'
# result = await self.fetch_one_video(bv_id=bv_id)
@ -385,7 +421,6 @@ class BilibiliWebCrawler:
# print(result)
if __name__ == '__main__':
# 初始化
BilibiliWebCrawler = BilibiliWebCrawler()