Coder Social home page Coder Social logo

gfriends-inputer's Introduction

logo

Gfriends 女友头像仓库

TotalNumber AutoUpdate GfriendBot
媒体服务器演员头像仓库。
旨在满足数量需求前提下,尽可能收集和处理高质量女友头像,并提供导入媒体服务器方案。

There is no correlation between this repo and Korean girl group GFRIEND.

目录

快速开始

已有多款软件使用女友仓库作为数据源。对于一般用户来说,无需手动下载头像,即可通过以下方案导入头像。

Emby / Jellyfin

1. Gfriends Inputer
由 Gfriends 提供

官方维护的 Jellyfin/Emby 头像导入工具,兼容女友仓库所有特性,全平台支持。

2. MDCx
由 Hermit 提供

演化自 MDC 的图形化刮削软件,支持带桌面的 Windows 和 MacOS。

或者试试安装插件导入?

3. JavScraper
由 JavScraper 提供

一个 Jellyfin/Emby 的日本电影刮削器插件,Emby JAV 刮削器元老。

4. MetaTube
由 MetaTube 提供

另一个为 Jellyfin/Emby 开发的好用插件,插件前端与刮削器后端分离,上手稍难。

Plex

1. JAVnfoMoviesImporter
由 ddd354 提供

基于 XBMCnfoMoviesImporter 修改的插件,增加了女友头像功能。

2. JAV.bundle
由 Xavier-Lam 提供

受 JAVLibrary.bundle 启发而开发的新插件,亦提供了 JAV 元数据刮削功能。

更多工具

推荐与 Gfriends Inputer 搭配刮削整理项目,神兵利器助您事半功倍。

Movie Data CaptureAVDC GUIJAVSDTJAVOneStopAvutil

您知道其他相似的开源工具?欢迎提交 issues 告诉我。

进阶说明

本项目以抓取官方高质量大图为主要目标,头像图片为自动化抓取,部分人工筛选。

上传新的头像图片到仓库

欢迎提交优质的演员头像图片或写真。以下条件应 尽可能 满足:

  1. 对应演员头像缺失或现有头像不堪入目。
  2. 新头像是以女友为主体的特写或近景、近似 3:2 的长宽比,且宽度宜在 300px 以上。

如果您的图片符合上述要求,则可以通过如下步骤上传图片:

  1. 轻击主仓库右上角 Fork 按钮,然后会自动克隆主仓库,并跳转到属于您的个人仓库。
  2. 移步至个人仓库 Content 下的 人工存储 HandStorage 目录,该目录拥有最高优先级,能保证上传的图片被优先使用。
  3. 轻击 Add files 菜单下的 Upload files 按钮,然后上传头像图片到仓库,图片应该以演员日文姓名.jpg来命名(请注意,仅支持jpg),女友仓库会自动匹配多语种姓名。在上传等待过程中,可以随便写一点 Commit Changes 说明,比如上传了哪些女友的图片。上传完成后轻击 Commit 提交。
  4. 进入 Pull Requests 板块下,点击 New Pull Requests 发起新的合并请求。稍等片刻,待仓库自动检查完成后,点击 Create Pull Requests 并轻击 Commit提交,请同时勾选 Allow edits by maintainers
  5. 至此,在经过人工审核和文件树自动刷新后,您的美图就可以和大家分享了。

P.S. 如果您发现某些女友未自动匹配别名,请提交 issue 告诉我她的日文姓名和别名。
您可以使用 文件检索 来搜索仓库中存储的头像文件,该功能仅支持日文名。

对女友仓库的开发及调用

请务必先阅读 法律信息及免责声明快速开始 所列出的工具均已开源,可供阁下在开发时参考。

【Json 文件树】

位于根目录的Filetree.json,是 内容 Content 文件夹的文件树,在头像图片变化时自动更新,可供程序调用搜索。 P.S. 在请求头中开启 Gzip 压缩可以大幅减少下载文件树所需的流量

以下是文件树格式示例:

{
  "Information": {
    "TotalNum": "TotalNum",
    "TotalSize": "TotalSize",
    "Timestamp": "Timestamp"
  },
  "Content": {
    "CompanyNameA": {
      "ActorNameA.jpg": "ActorNameA.jpg?t=FileATimestamp",
      "ActorNameB.jpg": "ActorNameB.jpg?t=FileBTimestamp",
    },
    "CompanyNameB": {
      "ActorNameA.jpg": "ActorNameA.jpg?t=FileATimestamp",
      "ActorNameB.jpg": "ActorNameB.jpg?t=FileBTimestamp",
    },
}

通过拼接 URL,您可以获得对应女友头像的下载链接。

这些值得留意:

  1. Information 对象内字段依次为:头像总数量 TotalNum、头像大小之和 TotalSize、文件树完成生成的微秒级时间戳 Timestamp
  2. Content 对象内字段按头像图片 质量升序 排列,参数 t 为头像文件更新时间的秒级时间戳 FileTimestamp。更多细节请继续往下阅读。

1. 多头像匹配

部分女友可能在多个厂牌下任职,亦或者参与过写真拍摄等,不排除同一位女友在仓库中存储了多张图片的情况。

{
  "Content": {
    "CompanyNameA": {
      "三上悠亚.jpg": "三上悠亚.jpg",
      "三上悠亚-1.jpg": "三上悠亚-1.jpg",
      "三上悠亚-2.jpg": "三上悠亚-2.jpg",
    },
    "CompanyNameB": {
      "三上悠亚.jpg": "三上悠亚.jpg",
      "三上悠亚-1.jpg": "三上悠亚-1.jpg",
    },
    "CompanyNameC": {
      "三上悠亚.jpg": "三上悠亚.jpg",
    },
}

2. 多姓名匹配

仓库已匹配女友的多语种姓名、艺名、片假名,甚至是素人佚名等别名。

但提请注意:无论何时,都应首先使用 主流艺名 为关键词进行搜索。

艺    名:妃月るい
简中译名:妃月由衣
繁中译名:紀月留衣
片 假 名:るいぺち
罗马拼音:Hiduki Rui、Rui Hiduki
素人佚名:Rui
曾 用 名:川島今日子、如月るい、日向美月、森平みさき、石原美紀、紀月るい
{
  "Content": {
    "CompanyNameA": {
      "妃月るい.jpg": "妃月るい.jpg",
      "妃月由衣.jpg": "妃月るい.jpg",
      "紀月留衣.jpg": "妃月るい.jpg",
      "るいぺち.jpg": "妃月るい.jpg",
      "Hiduki Rui.jpg": "妃月るい.jpg",
      "Rui Hiduki.jpg": "妃月るい.jpg",
      "川島今日子.jpg": "妃月るい.jpg",
      "如月るい.jpg": "妃月るい.jpg",
      "日向美月.jpg": "妃月るい.jpg",
      "森平みさき.jpg": "妃月るい.jpg",
      "石原美紀.jpg": "妃月るい.jpg",
      "紀月るい.jpg": "妃月るい.jpg",
}

3. AI 技术的应用

女友仓库通过 AI 鉴别并移除的违法头像,还会借助 AI 无损放大并优化的低质量头像图片、去除图片中的水印(如果有)。

{
  "Content": {
    "CompanyNameA": {
      "吉高寧々.jpg": "AI-Fix-吉高寧々.jpg",
}

女友仓库无法保证这些经优化的头像完美无瑕。若您不想调用获取到这些经 AI 优化的图片,只需删除文件树中的 AI-Fix- 前缀即可,仓库存储着未经 AI 处理的原始图片副本。

{
  "Content": {
    "CompanyNameA": {
      "吉高寧々.jpg": "吉高寧々.jpg",
}

【Recycled 回收站】

回收站 Recycled 目录是通过 AI 鉴别并移除的违法头像(基于中国大陆法律)。

文件树中不包含该目录,如有调用该目录需求请自行遍历。

【CDN 加速的镜像仓库】

鉴于 GitHub 在全球网络中的连通性不一,此全球可达的仓库镜像供阁下备用:https://cdn.jsdelivr.net/gh/xinxin8816/gfriends/

该链接仅供调用,无法使用浏览器直接访问

更新计划

女友仓库目前已趋于稳定,一段时间内不会有大型更新迭代。GfriendBot 将自动定期更新仓库内容。

✔ 自动定期抓取新入职女友头像至仓库(仅后述标注 🌟)
✔ 匹配多语种姓名(简体中文 / 繁体中文 / 日文)
✔ 匹配女友的多个艺名
✔ AI 放大并优化低分辨率头像(仅后述标注 ➡)
✔ AI 鉴别并移除违法违规头像
✔ AI 移除头像水印

图片来源

排序不分前后,表格更新可能滞后。
标注🌟的图片为原生高质量大图,标注➡的图片为经过 AI 算法放大优化的图片。
除下表外,仓库中还收录了热心网友提供或上传的头像,位于 人工存储 HandStorage 目录,后述法律信息同样适用于此。

第三方内容商

品牌 尺寸 数量 简介 备注
GRAPHIS 360×508 600+ 知名的美女摄影写真机构 🌟
Juicy Honey 640×960 30+ X-City 旗下的写真分支 🌟
LovePop 384×576 70+ 美少女写真摄影机构 🌟
FANZA inconsistent 15,000+ FANZA 官方(原DMM)
Warashi 250×300 2800+ 来自法国的演员数据库
Javrave inconsistent 6800+ 知名的演员资料数据库
Nanairo 400×400 700+ S-cute 旗下流媒体 🌟
AVDBS 380×460 800+ 来自韩国的演员数据库
Derekhsu inconsistent 3700+ 来自中国台湾的演员维基
Minnano inconsistent 19,000+ 来自日本的信息交流站 New Add!
DigiGra 380x576 750+ ImageBox 旗下流媒体 🌟 New Add!

经纪公司

品牌 尺寸 数量 旗下知名小姐姐 备注
Diaz Group 2880×1800 10+ 友田彩也香、東凛、卯水咲流、長瀬麻美 🌟 New Add!
T-powers 948×948 130+ 天海つばさ、野々浦暖、河合あすな、结城のの 🌟 New Add!
最大的女友经纪公司
Bambi 500×500 30+ 星奈あい、藍芽みずき、西村ニーナ、天音ゆい 🌟 New Add!
Eightman 600×800 50+ 葵つかさ、吉高寧々、七海ティナ、つばさ舞 🌟 New Add!
位于关西的事务所
Mine's 300×300 40+ 明里ともか、朝倉ここな、あさみ潤、幾田まち 🌟 New Add!
C-more 1920×1080 30+ JULIA、明里つむぎ、本庄鈴、桐谷まつり 🌟 New Add!
Arrows 720×1000 10+ 松本いちか、七嶋舞、今井夏帆、月野かすみ 🌟 New Add!
Capsule 1920×2560 30+ 七沢みあ、香坂紗梨、稲森美優、結菜さき 🌟 New Add!
AllPro inconsistent 30+ 佐知子、八乃つばさ、加藤ツバキ、夏川うみ 🌟 New Add!
AllGroup 旗下企业
Attractive inconsistent 20+ 永瀬ゆい、楓ふうあ、葵いぶき、皆瀬あかり 🌟 New Add!

品牌官方

品牌 尺寸 数量 旗下知名小姐姐 备注
S1 No. 1 Style 470×600 300+ 三上悠亜、羽咲みはる、桜羽のどか、架乃ゆら 🌟
人气与美形著称
MUTEKI 640×906 50+ 深山あすか、水瀬ちあき、松本菜奈実、夢川エマ 🌟
FaleNO 1500×2125 10+ 桥本有菜、吉高寧々、美乃すずめ、佐藤ゆか 🌟
AllPro 旗下公司
Dahlia 1500×2125 10+ 水川潤、徳永しおり、月見伊織、本田もも 🌟 New Add!
FaleNO 旗下品牌
Attackers 216×270 1000+ 明里つむぎ、岬ななみ、二宮ひかり、結城のの ➡432×540
Moodyz 600x783 1300+ 高桥しょう子、西宫このみ、伊东ちなみ、千早希 🌟
Premium 544x724 100+ 樱木凛、星野美优、冬月枫、二宫沙树 🌟
Idea Pocket 300×300 100+ 天海つばさ、相沢みなみ、桃乃木かな、希崎ジェシカ ➡600×600
KM Produce 330×330 10+ 川上优、麻生岬、麻仓忧、神咲诗织 ➡660×660
kawaii* 640×896 300+ ひなみちゃん、伊藤舞雪、宇佐木あいか、有栖るる 🌟
Prestige
蚊香社
119×170 200+ 永瀬みなも、有村のぞみ、園田みおん、藤江史帆 绝对美少女制造商
➡476×680
未満 290×390 100+ あやみ旬果、さくらゆら、高岡美鈴、高梨ゆあ ➡580×780
无垢 110×70 300+ 河南実里、高杉麻里、本橋実来、大島美緒 ➡440×280
桃太郎映像 451×600 200+ 宝生リリー、泉りおん、入江愛美、阿部乃みく 🌟
专业企划制造商
えむっ娘ラボ 168×191 200+ 有坂深雪、有村のぞみ、笹倉杏、上原亜衣 ➡336×382
OPPAI 312×364 100+ 浜崎真緒、成海さやか、美緒みくる、柊るい ➡624×728
E-BODY 702x900 500+ Julia、红城まゆ、羽野理沙、蒂亚 🌟
Wanz Factory 280×280 200+ 椎名そら、つぼみ、水野朝陽、浅井ルリ子 ➡560×560
Honnaka
本中
335×375 300+ さわきりほ、さくらみゆき、つくしみか、あいだ飛鳥 ➡670×750
kira☆kira 180×180 170+ 加瀬エリナ、水谷心音、霧嶋りお、有村リア ➡360×360
BeFree 215×215 100+ つぼみ、浜崎真緒、安藤美奈子、坂口れな ➡430×430
痴女天堂 300×300 300+ 大槻ひびき、沖田杏梨、大浦真奈美、渚みつき ➡600×600
Fitch 300×392 500+ 春菜はな、美園和花、月森ゆの、河北はるな ➡600×786
Madonna 230×420 1700+ 美森けい、谷花紗耶、桜井ゆみ、今井ひまり 🌟
溜池ゴロー 100×100 500+ めぐり、本田岬、かすみ果穂、さとう遥希 MOODYZ 旗下公司
➡400×400
Das! 280×280 300+ あべみかこ、冴月りん、跡美しゅり、一ノ瀬梓 ➡560×560
ラグジュTV 116×236 900+ 藤本ゆうり、美園和花、浜崎真緒、あやみ旬果 ➡332×472

扫黄打非 · 净网行动

鉴于女友仓库目前受众多为中国大陆地区用户,为积极配合中国大陆地区相关部门开展专项行动,女友仓库将依托于 AI 技术,尽最大可能鉴别和删除违规头像。在此呼吁广大用户自觉守法、相互监督,共同打造绿色健康的网络环境。

投诉邮箱:Gfriends#keemail.me

法律信息及免责声明

  1. 本项目作者旨在学习 Python 后端,提高编程水平。
  2. 项目仅用于技术、学术交流,严禁用于商业和其他盈利目的。
  3. 请自觉遵守当地法律法规,产生的一切后果由用户自行承担。
  4. 头像图片版权归相应网站及演员所属经纪公司所有。
  5. 作者保留最终决定权和最终解释权。

若您不同意上述任一条款,请勿直接或间接使用本项目。

gfriends-inputer's People

Contributors

xinxin8816 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gfriends-inputer's Issues

间接性报错

运行好几,每次都是不同时间段报错,有时候是运行就报错,有时候是运行大半才报错。已经通过clash客户端开启全局模式。
报错信息如下
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "site-packages\requests\adapters.py", line 439, in send
File "site-packages\urllib3\connectionpool.py", line 719, in urlopen
File "site-packages\urllib3\util\retry.py", line 436, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /xinxin8816/gfriends/master/Content/x-E-body/AYU.jpg (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Gfriends Inputer.py", line 141, in
File "site-packages\requests\api.py", line 75, in get
File "site-packages\requests\api.py", line 60, in request
File "site-packages\requests\sessions.py", line 533, in request
File "site-packages\requests\sessions.py", line 646, in send
File "site-packages\requests\adapters.py", line 510, in send
requests.exceptions.ProxyError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /xinxin8816/gfriends/master/Content/x-E-body/AYU.jpg (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)))

Gfriends Inputer 图片损坏导致尺寸优化错误

尺寸优化...
!! ./Downloads/田中美佳.jpg 可能已损坏,跳过。
[===========================! ] (!) 5710/8263 [69%] in 1.3s (4338.66/s)
Traceback (most recent call last):
File "Gfriends Inputer.py", line 29, in fix_size
File "PIL\Image.py", line 1133, in crop
File "PIL\ImageFile.py", line 245, in load
OSError: image file is truncated (11 bytes not processed)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Gfriends Inputer.py", line 530, in
File "Gfriends Inputer.py", line 65, in fix_size
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: './Downloads/田中美佳.jpg' -> './Downloads/Failed/田中美佳.jpg'

× 未知错误,在配置文件中开启 Debug 可获得错误详情。
按任意键退出程序...

群晖无法执行binary, 有其他导入办法吗

ash-4.3# ./Gfriends\ Inputer
[28596] Error loading Python lib '/tmp/_MEIIsAszd/libpython3.8.so.1.0': dlopen: /lib/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/_MEIIsAszd/libpython3.8.so.1.0)

出现未知致命错误,已经打开全局代理

读取 Emby / Jellyfin 演员...
Traceback (most recent call last):
File "Gfriends Inputer.py", line 177, in
File "Gfriends Inputer.py", line 142, in read_persons
File "json_init_.py", line 348, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

未知致命错误!

头像导入阶段意外中断

下载头像...
!! ./Downloads/美倉あやみ.jpg 校验失败,可能是仓库收录的头像已损坏。
[========================================] 3682/3682 [100%] in 0:05:01 (12.19/s)
√ 下载完成

尺寸优化...
!! ./Downloads/沙羅.jpg 可能已损坏,跳过。
!! ./Downloads/美木ななみ.jpg 可能已损坏,跳过。
!! ./Downloads/菊池えりか.jpg 可能已损坏,跳过。
[========================================] 3681/3681 [100%] in 0:01:05 (55.80/s)
√ 优化完成

导入头像...
[=========================! ] (!) 2339/3681 [64%] in 0:02:50 (13.72/s)
Traceback (most recent call last):
File "Gfriends Inputer.py", line 509, in
FileNotFoundError: [Errno 2] No such file or directory: './Downloads/沙羅.jpg'

× 未知错误,在配置文件中开启 Debug 可获得错误详情。

v3.02: ImportError: libGL.so.1: cannot open shared object file

系统版本: Unraid 6.10.3
软件版本: Gfriends Inputer v3.02 - Gfriends-Inputer-Linux.zip

错误信息:

Traceback (most recent call last):
  File "Gfriends Inputer.py", line 771, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
  File "Lib/cv2dnn.py", line 2, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
  File "cv2/__init__.py", line 5, in <module>
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
[17341] Failed to execute script 'Gfriends Inputer' due to unhandled exception!

无法导入头像

1
2
前几天开始出现这个问题的 重新解压了软件
匹配演员清单和未收录清单都正常 但是下载不了头像 downloads文件夹一直是空的

无法读取配置文件

Traceback (most recent call last):
File "Gfriends Inputer.py", line 153, in read_config
UnboundLocalError: local variable 'BD_AI_client' referenced before assignment

× 无法读取 config.ini。如果这是旧版本的配置文件,请删除后重试。

config.ini 已经删除过。

3.02下载出现错误

× 未知错误,请查阅 Getter 目录的 logger.log 日志文件。

2022-08-06 17:13:49 - [ERROR]1109:: 未知错误异常退出:Traceback (most recent call last):
File "Gfriends Inputer.py", line 826, in
File "Gfriends Inputer.py", line 146, in get_gfriends_map
File "requests\structures.py", line 52, in getitem
KeyError: 'content-length'

用域名连接jellyfin连接失败,配置了代理也会连接失败

版本 :2.91
系统:pve / debian 11

1、外网ddns配置的域名,内网adg上添加的域名映射到内网ip
不管是用外网的域名,还是内网的域名,都无法链接jellyfin,改用内网ip后连接正常

Gfriends Inputer v2.91
https://git.io/gfriends

[CN]**四川 推荐开启全局代理

按任意键开始...
× 连接 Emby / Jellyfin 服务器失败,请检查地址是否正确: http://xxxxxx.com:9009/

× 用户强制停止或已知错误。

2、只要配置了代理,不管是http、socks5代理,代理方式不管是全局,还是repo,连接jellyfin都会失败,哪怕jellyfin配置的内网ip也会失败

代理确定是正常的,系统apt也使用的该代理

Gfriends Inputer v2.91
https://git.io/gfriends

[DE]德国黑森州 已连通局部代理 女友仓库经由代理连接

按任意键开始...
× 连接 Emby / Jellyfin 服务器失败,请检查地址是否正确: http://192.168.20.30:8096/

× 用户强制停止或已知错误。

这里是http代理日志

Oct 10 18:36:04 debian MEOW[14681]: [>>>>>] 2021/10/10 18:36:04 PROXY 192.168.20.30:48854 CONNECT api.myip.la:443
Oct 10 18:36:04 debian MEOW[14681]: [>>>>>] 2021/10/10 18:36:04 PROXY 192.168.20.30:48856 CONNECT api.github.com:443

emby服务器连接问题

设备为群晖+emby套件(4.6、4.7都尝试过,DSM版本6.0,emby为两个用户)。目前问题是连接不上服务器,提示:连接 Emby / Jellyfin 服务器失败,请检查地址是否正确。多次尝试也没试出规律,url和api设置全部正确。测试内容大概描述一下:多次更换api未果,从4.6升级到4.7也不行,但是偶然一次利用4.7清空数据库功能后成功,但后来隔一段时间后再次尝试发现又连接不上。怀疑数据库问题,将emby彻底删除重新安装,可以正常连接,添加两个用户下的数据库后又不能连接。再次将emby彻底删除重新安装,先添加女友仓库,正常连接正常更新,待添加完其他电影库后又不可连接。今日突然想到用旧版测试,2.82版可正常连接。不知道问题出在哪里了。

Gfriends Inputer导入报错

修改后config.ini无法使用
报错:
Traceback (most recent call last):
File "Gfriends Inputer.py", line 71, in read_config
File "configparser.py", line 696, in read
File "configparser.py", line 1014, in _read
File "c:\hostedtoolcache\windows\python\3.7.7\x64\lib\codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

无法读取 config.ini

修改编码为utf-8后依然报错:

Traceback (most recent call last):
File "Gfriends Inputer.py", line 71, in read_config
File "configparser.py", line 696, in read
File "configparser.py", line 1079, in _read
configparser.MissingSectionHeaderError: File contains no section headers.
file: 'config.ini', line: 1
'\ufeff[媒体服务器]\n'

无法读取 config.ini

系统win10,使用最新v2.3
请求支援

连接服务器失败

大佬你好,我已经配置了api密钥,但是一直提示连接服务器失败,显示如下:

[HK]**香港 正通过全局代理访问
× 连接 Emby / Jellyfin 服务器失败,请检查: http://127.0.0.1:8096/
× 用户强制停止或已知错误。
按任意键退出程序...

求解😭

NameError: name 'cv2' is not defined

C:\Users\Administrator\Desktop\Gfriends-Inputer-Windows>"Gfriends Inputer.exe"
Traceback (most recent call last):
File "Lib\cv2dnn.py", line 7, in
File "C:\Users\ADMINI~1\AppData\Local\Temp_MEI48002\cv2_init_.py", line 5,
in
from .cv2 import *
ImportError: DLL load failed while importing cv2: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Gfriends Inputer.py", line 772, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "Lib\cv2dnn.py", line 25, in
NameError: name 'cv2' is not defined
[4412] Failed to execute script 'Gfriends Inputer' due to unhandled exception!

系统是Windows2012,下载的是最新的3.03

debian11上运行源码版也不行。

Traceback (most recent call last):
File "/opt/gfriends-inputer/Lib/cv2dnn.py", line 7, in
import cv2
File "/usr/local/lib/python3.9/dist-packages/cv2/init.py", line 181, in
bootstrap()
File "/usr/local/lib/python3.9/dist-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/gfriends-inputer/./Gfriends Inputer.py", line 772, in
from Lib.cv2dnn import find_faces
File "/opt/gfriends-inputer/Lib/cv2dnn.py", line 25, in
except cv2.error:
NameError: name 'cv2' is not defined

emby使用该软件时,在连接emby成功后报错,请问是什么原因,怎么解决?

日志:
2022-08-24 14:22:15 - [INFO]413:read_config: 配置文件读取成功
2022-08-24 14:22:15 - [INFO]18:: OpenCV 初始化成功
2022-08-24 14:22:16 - [INFO]718:check_update: 未检测到新版本
2022-08-24 14:22:16 - [INFO]800:: Gfriends Inputer v3.02 启动成功
2022-08-24 14:22:18 - [INFO]807:: 代理配置:{'http': 'http://127.0.0.1:21882', 'https': 'http://127.0.0.1:21882'},IP归属地:[US]美国加利福尼亚州
2022-08-24 14:22:19 - [ERROR]563:read_persons: Emby / Jellyfin 返回:500
2022-08-24 14:22:19 - [ERROR]1106:: 已知错误异常退出
2022-08-24 14:22:28 - [INFO]1114:: 正常退出

运行截图:
}RR1)43 {1LF 3W%AQVS}S6

女优信息无法搜索导入

头像下载导入正常,但是女优信息无法搜索导入,代理已开,全局和非全局都试过,log里面也没有相关提示

503报错

[HK]**香港 已连通局部代理

× 连接 Emby / Jellyfin 服务器成功,但是服务器内部错误:503
× 已知错误,请查阅 Getter 目录的 logger.log 日志文件。
按任意键退出程序...

3.02版本

v2.7 执行报错

Traceback (most recent call last):
  File "configparser.py", line 789, in get
  File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\collections\__init__.py", line 898, in __getitem__
  File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\collections\__init__.py", line 890, in __missing__
KeyError: 'max_ul'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Gfriends Inputer.py", line 108, in read_config
  File "configparser.py", line 792, in get
configparser.NoOptionError: No option 'max_ul' in section: '导入设置'

× 无法读取 config.ini。如果这是旧版本的配置文件,请删除后重试。

按任意键退出程序...

config.ini 是新版自动生成的

debian运行报错

[28367] Error loading Python lib '/tmp/_MEIV4dclj/libpython3.8.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIV4dclj/libpython3.8.so.1.0)

希望提供并行下载

您好,

希望可以通过并行下载来加快完成速度反正也是从github上拖。只是看到代码里有许多 exception handling & debug 的部分,考虑到开发者的时间,先做一个 testing 的 preview 也可以))

女友匹配错乱了。。。

embyserver windows 4.7.5
gi 3.02版本或者3.01版本 (可能是开了女友简介(xlist),不太确定)以后
影片对应 女优名字头像随机错乱(有些正确有些错误,之前整理的是完全正确的)
错乱表现为 原本影片对应的女友变成其他人了
手动修改nfo无效(自动更新为另一个女优)
手动修改emby元数据无效(把错误的演员删除后 填写正确的演员名 会自动跳转到另外一个演员名)
不知道是不是emby数据库哪个表乱了
对非gi整理的演员无错误
例子1:
比如说abw-054 是凉森 然后emby显示的是美波什么的 把美波手动从元数据删除,填入凉森,存储,瞬间又跳转到美波
abw-054.nfo 里面 actor从凉森变成了美波(我重新用mdc搜刮后,再手动更改元数据凉森后又正确了,nfo复现错误失败)
例子2:
为了复现例子1的错误,没有再用mcd搜刮
abs-078 是朱音 变成另一个女优后手动更改成朱音ゆい 存储后 又变成宮下玲奈*(与第一次错误的女优不同)
附上复现后abs-068.nfo

JP-18+ false 2022-07-19 14:02:20 <title>ABS-078 朱音ゆい 一泊二日、美少女完全予約制。 朱音ゆい</title> ABS-078 朱音ゆい 一泊二日、美少女完全予約制。 朱音ゆい 宮下玲奈 Actor ot friends:https://xslist.org/zh/model/5637.html E:\embyserver\programdata\metadata\people\宮下玲奈\folder.jpg 2012 ABS-078 朱音ゆい 一泊二日、美少女完全予約制。 朱音ゆい JP-18+ 2012-02-20 2012-02-20 155 單體作品 巨乳 美少女 一泊二日、美少女完全予約制。 ABSOLUTE プレステージ 單體作品 巨乳 美少女 一泊二日、美少女完全予約制。 ABSOLUTE G:\色色\小日本子\abs-078\ABS-078-poster.jpg G:\色色\小日本子\abs-078\ABS-078-fanart.jpg G:\色色\小日本子\abs-078\ABS-078-fanart.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-1.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-2.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-3.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-4.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-5.jpg G:\色色\小日本子\abs-078\extrafanart\extrafanart-6.jpg false 0 false 0 9313.842 wmapro wmapro 384000 jpn progressive 2 48000 False False ABS-078-poster.jpg ABS-078-thumb.jpg ABS-078-fanart.jpg プレステージ 一泊二日、美少女完全予約制。 ABS-078 2012-02-20 https://www.javbus.com/pics/cover/3u51_b.jpg https://www.javbus.com/ABS-078

str错误

Traceback (most recent call last):
File "Gfriends Inputer.py", line 807, in
TypeError: can only concatenate str (not "NoneType") to str
[9424] Failed to execute script 'Gfriends Inputer' due to unhandled exception!

看了下807行
logger.info('代理配置:' + str(proxies) + ',IP归属地:' + public_ip)

proxies定义在 779行
if Proxy:
proxies = {'http': Proxy, 'https': Proxy}
else:
proxies = None

proxies 这个要判断下是不是非空

3.02版本的代理模块太傻了

不指定代理,则连不上头像仓库,但是连jellyfin的服务器没问题;
指定代理,能连上头像仓库了,但是连不上jellyfin的服务器了;
最后我不的不翻源码,翻到仓库的网址,跑到路由器上去加区旁路仓库地址到红杏上。
2.94版本就没有这个问题,会自动旁路内网(jellyfin服务器)地址。

Error: UNC paths are not supported. Defaulting to Windows directory.

出現以下錯誤請問如何處理?

在CONFIG.INI已經輸入以下資料:
[媒体服务器]

Emby / Jellyfin 服务器地址

Host_Url = http://192.168.50.104:8096/

Emby / Jellyfin API 密匙

API_ID = XXXXXXX (從EMBY加入API並且拷貝在這裏)

執行EXE顯示下錯誤
'\Mac\Home\Desktop\Movie Management\Gfriends Inputer'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Traceback (most recent call last):
File "configparser.py", line 789, in get
File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\collections_init_.py", line 898, in getitem
File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\collections_init_.py", line 890, in missing
KeyError: 'host_api'

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Gfriends Inputer.py", line 164, in read_config
File "configparser.py", line 792, in get
configparser.NoOptionError: No option "host_api" in section: '媒體服務器"

x無法讀取 config.ini。 如果這是舊版本的設置文件, 請刪除後重試。

按任意鍵退出程序...
'\Mac\Home\Desktop\Movie management\Gfriends Inputer'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory

服务器演员列表不能识别。

QQ截图20220919224311

日志内容:
2022-09-19 22:43:05 - [INFO]426:read_config: 配置文件读取成功
2022-09-19 22:43:05 - [INFO]19:: OpenCV 初始化成功
2022-09-19 22:43:06 - [INFO]718:check_update: 未检测到新版本
2022-09-19 22:43:06 - [INFO]815:: Gfriends Inputer v3.03 启动成功
2022-09-19 22:43:06 - [INFO]822:: 代理配置:None,IP归属地:[JP]日本东京都
2022-09-19 22:43:06 - [ERROR]583:read_persons: Emby / Jellyfin 的响应无法解析为 Json:text/html
2022-09-19 22:43:06 - [ERROR]1102:: 已知错误
2022-09-19 22:43:20 - [INFO]1110:: 退出程序

jellyfin版本:10.8.4
容器:nyanmisaka/jellyfin

v2.93版本中101行报错AttributeError,另附一个临时解决方案

在2.93版本遇到了报错,运行日志如下:

Gfriends Inputer v2.93
https://git.io/gfriends

[HK]**香港 已连通局部代理 女友仓库经由代理连接

按任意键开始...
√ 连接 Emby / Jellyfin 服务器成功
   演职人员:5015人

Traceback (most recent call last):
  File "/Users/zhanchangyou/PycharmProjects/gfriends-inputer/Gfriends Inputer.py", line 538, in <module>
    gfriends_map = get_gfriends_map(repository_url)
  File "/Users/zhanchangyou/PycharmProjects/gfriends-inputer/Gfriends Inputer.py", line 101, in get_gfriends_map
    for k, v in map_json[first][second].items():
AttributeError: 'int' object has no attribute 'items'

× 未知错误,在配置文件中开启 Debug 可获得错误详情。

把项目拉到本地看了一下发现可能是因为主仓库的json用了新的结构,但是又没有更新这个处理循环,所以在处理的时候会遇到map_json[first][second]的值为int的情况,然后就会抛出AttributeError,下面是报错前的调试信息:
image

没有仔细看整个程序的具体流程,所以也就没有提requests,这里给遇到同样情况的哥们提供一个简单粗暴的解决方案,仅供临时规避问题使用,在101行的for k, v in map_json[first][second].items():之前,插入一个类型检查语句,专门检查map_json[first][second]的类型,判断如果类型为int则直接break循环,修改完之后差不多是这样(注意缩进):

    for first in first_lvls:
        second_lvls = map_json[first].keys()
        for second in second_lvls:  # 100行
            if type(map_json[first][second]) is int:  # 加了这一句判断类型
                break  # 当循环到int的时候直接break
            for k, v in map_json[first][second].items():  # 原101行
                secondstr = re.sub(".*-", "", second)
                if not secondstr in Black_List:
                    output[k[:-4]] = gfriends_template.format(first, second, v)
    print('√ 连接 Gfriends 女友头像仓库成功')

以上修复方法我已经实践过,一切运行正常,头像也能正常更新,算是xinxin大佬正式修复前的临时解决方案吧,仅供各位参考。附一个我的运行结果:

Gfriends Inputer v2.93
https://git.io/gfriends

已配置局部代理 http://127.0.0.1:7890,但似乎无法连通,请检查其格式和可用性

按任意键开始...
√ 连接 Emby / Jellyfin 服务器成功
   演职人员:5015人

√ 连接 Gfriends 女友头像仓库成功
   库存头像:151211枚

√ 引擎初始化成功

>> 下载头像...
[========================================] 160/160 [100%] in 0:01:18 (2.04/s)
√ 下载完成

>> 尺寸优化...
[========================================] 160/160 [100%] in 3.4s (47.16/s)
√ 优化完成

>> 导入头像...
[========================================] 160/160 [100%] in 54.4s (2.94/s)
√ 导入完成

Emby / Jellyfin 演职人员共 5015 人,其中 1508 人之前已有头像
本次导入 160 人,还有 4855 人没有头像

在新服务器上使用时检查更新失败并且报错校验失败

报错更新失败和校验失败,但是能成功导入,美国服务器,应该不是网络问题

不知道能否复现


× 检查更新失败!

按任意键跳过更新...
Gfriends Inputer v2.91
https://git.io/gfriends

推荐开启全局代理

按任意键开始...
√ 连接 Emby / Jellyfin 服务器成功
   演职人员:913人

>> 连接 Gfriends 女友头像仓库...
√ 连接 Gfriends 女友头像仓库成功
   库存头像:151143枚

√ 引擎初始化成功                      

>> 下载头像...
!! ./Downloads/AIKA.jpg 校验失败,可能是仓库收录的头像已损坏。
!! ./Downloads/REMI.jpg 校验失败,可能是仓库收录的头像已损坏。
!! ./Downloads/RISA.jpg 校验失败,可能是仓库收录的头像已损坏。
...


!! ./Downloads/黒崎みか.jpg 校验失败,可能是仓库收录的头像已损坏。
!! ./Downloads/麻里梨夏.jpg 校验失败,可能是仓库收录的头像已损坏。
[========================================] 572/572 [100%] in 32.4s (17.63/s) 
!! ./Downloads/黒川すみれ.jpg 校验失败,可能是仓库收录的头像已损坏。
√ 下载完成

>> 尺寸优化...
[========================================] 572/572 [100%] in 17.0s (33.59/s) 
√ 优化完成

>> 导入头像...
[========================================] 572/572 [100%] in 2.4s (241.67/s) 
√ 导入完成.

Emby / Jellyfin 演职人员共 913 人,其中 576 人之前已有头像
本次导入 572 人,还有 335 人没有头像

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.