change: 修改说明类型

change: 修改脚本主程序日志输出
This commit is contained in:
Carol 2023-09-06 14:30:53 +08:00
parent e19542fe92
commit 0be68d94fe
2 changed files with 8 additions and 3 deletions

View File

@ -1,9 +1,12 @@
# tmdb-person
> 根据nfo文件信息刮削相关演员信息及图片
>
> 解决docker部署的emby服务无法正常刮削到视频演员信息问题(通过nastool可以正常刮削到视频信息)
![](https://img.shields.io/badge/Python-3.8-green)
![](https://img.shields.io/badge/TMDB-V3-blue)
根据nfo文件信息刮削相关演员信息及图片
## 数据
### example

View File

@ -53,7 +53,7 @@ class Analyze:
class Tmdb:
def __init__(self, tmdb_id, actor_path, tmdb_token):
def __init__(self, tmdb_id, actor_path, tmdb_token, language="zh-CN"):
self.image_path = None
self.tmdb_id = tmdb_id
self.actor_path = actor_path
@ -61,9 +61,10 @@ class Tmdb:
"accept": "application/json",
"Authorization": "Bearer " + tmdb_token
}
self.language = language
def get_actor_info(self):
url = "https://api.themoviedb.org/3/person/" + self.tmdb_id + "?language=zh-CN"
url = "https://api.themoviedb.org/3/person/" + self.tmdb_id + "?language=" + self.language
headers = self.header
response = requests.get(url, headers=headers)
log.logger.info("当前刮削到的演员元数据:{0}".format(response.text))
@ -149,4 +150,5 @@ if __name__ == '__main__':
# 初始化日志
log = __init_logger()
# 开始执行主程序
# 默认 language="zh-CN" (简体中文),可以通过修改 "language" 的值变更获取元数据的语言类别
__execute(dir_path=__dir_path, output=__output, tmdb_token=__tmdb_token)