本插件是pcrjjc插件的重置版,可以独立于后端api运行

Overview

pcrjjc2

本插件是pcrjjc重置版,不需要使用其他后端api,但是需要自行配置客户端

本项目基于AGPL v3协议开源,由于项目特殊性,禁止基于本项目的任何商业行为

配置方法

  1. 环境需求:.net framework 4.5及以上 jre8
    别忘了装jre8
    别忘了装jre8
    别忘了装jre8
    重要的事情说三遍
  2. 用模拟器或root过的手机打开公主连结,并且游客登录或者账号登录,并过完全部教程
  3. 复制模拟器/data/data/com.bilibili.priconne/shared_prefs文件夹下的bili_key.xml和TouristLogin.xml或login.xml(如果是游客登录就是touristlogin.xml, 如果是账号登录是login.xml),放置到项目目录toolchain文件夹下
  4. 运行BiliPrefReader.exe
  5. 复制生成的touristlogin.json或者login.json到项目根目录(pcrjjc2文件夹)下,并重命名为account.json 似乎这一步会有奇妙的bug,导致只有output.txt生成,此时请把报错文件err.log发给我/提到issue上,可以手动构造account.json,参数如下:
{
    "uid": "output.txt中的uid_long,数字格式",
    "access_key": "output.txt中的access_token",
    "platform": 2,
    "channel": 1
}
  1. 本插件仅依赖于account.json即可以运行,不需要同时开着模拟器也不需要toolchain下任何其他文件,更不需要在服务器上开模拟器
Comments
  • tw分支中关于msgpack的unpackb方法的问题

    tw分支中关于msgpack的unpackb方法的问题

    在pcrclient.py的unpack方法中报错: msgpack.exceptions.ExtraData: unpack(b) received extra data 我在StackOverflow上查了相关的一些回答,没有办法很好地解决。 比如将msgpack换成umsgpack,或者替换不同msgpack的版本等等。 不过我也注意到requirement.txt限制该依赖在1.0.2版本以上,应该不是版本问题 对代码不是很熟悉,希望能帮忙一下,谢谢

    python [2021-04-02 11:53:27,435 竞技场推送] INFO: Message 464351974 triggered wrapper by RexTrigger. C:\Users\Ryzin\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py:979: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( [2021-04-02 11:53:30,451 竞技场推送] ERROR: <class 'msgpack.exceptions.ExtraData'> occured when wrapper handling message 464351974. [2021-04-02 11:53:30,451 竞技场推送] ERROR: unpack(b) received extra data. Traceback (most recent call last): File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\msghandler.py", line 30, in handle_message await sf.func(bot, event) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\__init__.py", line 103, in on_query_arena res = await query(id) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\__init__.py", line 58, in query await client.login() File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 151, in login await self.callapi('/check/check_agreement', {}) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 127, in callapi response = self.unpack(response)[0] File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 94, in unpack return unpackb(dec, File "msgpack\_unpacker.pyx", line 202, in msgpack._cmsgpack.unpackb msgpack.exceptions.ExtraData: unpack(b) received extra data.

    opened by Ryzin 28
  • 突然就报这个错了

    突然就报这个错了

    之前好好的

    Execution of job "SafeService.decoWrapper.<locals>.wrapper (trigger: interval[0:01:00], next run at: 2022-10-28 14:28:04 CST)" skipped: maximum number of running instances reached (1)

    opened by WindStill 16
  • 请问这个是哪里出了问题?

    请问这个是哪里出了问题?

    [2022-06-09 10:54:09,513 竞技场推送] INFO: 开始生成竞技场查询图片... [2022-06-09 10:54:09,547 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/107561.webp [2022-06-09 10:54:11,275 竞技场推送] ERROR: <class 'FileNotFoundError'> occured when wrapper handling message 723046859. [2022-06-09 10:54:13,490 竞技场推送] ERROR: [Errno 2] No such file or directory: '../res/img\priconne\unit\icon_unit_107561.png' Traceback (most recent call last): File "D:\Program Files\Hoshino_XCW\hoshino\msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2_init_.py", line 253, in on_query_arena_all result_image = await generate_info_pic(res, uid) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\create_img.py", line 259, in generate_info_pic return await run_sync_func(_generate_info_pic_internal, *args, **kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\aiorequests.py", line 10, in run_sync_func return await asyncio.get_event_loop().run_in_executor( File "D:\Program Files\Python\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\create_img.py", line 49, in _generate_info_pic_internal pic_dir = chara.fromid(id_favorite).icon.path File "D:\Program Files\Hoshino_XCW\hoshino\modules\priconne\chara.py", line 148, in icon download_chara_icon(self.id, 6) File "D:\Program Files\Hoshino_XCW\hoshino\modules\priconne\chara.py", line 118, in download_chara_icon img.save(save_path) File "D:\Program Files\Python\lib\site-packages\PIL\Image.py", line 2209, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: '../res/img\priconne\unit\icon_unit_107561.png'

    opened by yfsunrise 7
  • 验证码链接发不出来

    验证码链接发不出来

    现在的验证码链接应该是被腾讯过滤了,管理员收不到机器人发的验证码。

    await bot.send_private_msg(
         # self_id = sid,
        user_id = acinfo['admin'],
        message = f'pcr账号登录需要验证码,请完成以下链接中的验证内容后将第一行validate=后面的内容复制,并用指令/pcrval xxxx将内容发送给机器人完成验证\n验证链接:'
    )
    

    把message里的 url 去掉,就能收到通知了

    opened by WindStill 5
  • tw

    tw

    TW分支登录报错205。。。标题一不小心按到回车了没打全。 [2021-06-02 20:21:36,131 nonebot] INFO: Self: 471425760, Message 1696779255 from 2775116592@[群:792730444]: '竞技场查询 259356212' [2021-06-02 20:21:36,132 竞技场推送] INFO: Message 1696779255 triggered wrapper by RexTrigger. C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /check/check_agreement api called C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /check/game_start api called C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /load/index api failed code = 205, {'status': 3, 'title': '伺服器錯誤 ', 'message': '遊戲發生錯誤。\\n即將返回標題畫面。'} 这是错误代码

    opened by BlackTitle 5
  • requirements.txt  疑似依赖存在问题

    requirements.txt 疑似依赖存在问题

    环境: 宿主机:ubuntu 20.04 Docker Debian10 (buster) python 3.8.7

    原 requirements.txt 如下 ,其中 msgpack_python 最后更新日期为 2018年3月,对python3支持可能不是很好?在按照readme.md部署加载moduel时,所有jjc查询功能失效。报错如下面error.log部分。

    谷歌后找到了一个issue,提示与 msgpack 有关,检查后在源码requirement.txt里找到相关设置。 我这边尝试了两个步骤,升级msgpack到1.0.4未能解决问题。卸载msgpack_python后,功能恢复正常,也没有错误日志了

    msgpack_python==0.5.6
    msgpack==1.0.2
    nonebot==1.8.4
    Pillow==9.0.1
    pycryptodome==3.14.1
    python_dateutil==2.8.2
    requests==2.27.1
    zhconv==1.4.3
    

    error log如下:

    [2022-06-13 00:16:31,827 竞技场推送] ERROR: <class 'TypeError'> occured when wrapper handling message -20*********5.
    [2022-06-13 00:16:31,827 竞技场推送] ERROR: __init__() got an unexpected keyword argument 'strict_map_key'
    Traceback (most recent call last):
      File "/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message
        await sf.func(bot, event)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/safeservice.py", line 25, in wrapper
        return await func(*args, **kwargs)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 195, in on_query_arena
        res = await query(id)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 125, in query
        await client.login()
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 205, in login
        lres = await self.callapi('/tool/sdk_login', {
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 146, in callapi
        response = pcrclient.unpack(response)[0] if crypted else loads(response)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 130, in unpack
        return unpackb(dec[:-dec[-1]],
      File "/usr/local/lib/python3.8/site-packages/msgpack/fallback.py", line 118, in unpackb
        unpacker = Unpacker(None, **kwargs)
    TypeError: __init__() got an unexpected keyword argument 'strict_map_key'
    
    
    opened by LiYangkai 3
  • SafeService报错

    SafeService报错

    报错代码Execution of job "SafeService.decoWrapper..wrapper (trigger: interval[0:01:00], next run at: 2022-02-28 01:05:10 CST)" skipped: maximum number of running instances reached (1) 重启好像暂时会好 也可能是其他插件的问题,但好像就这个插件不能用 改成星乃的Service就没问题了

    opened by SonderXiaoming 3
  • 依然有问题,不知道为啥

    依然有问题,不知道为啥

    [2022-12-07 02:13:35,084 竞技场推送] ERROR: <class 'AttributeError'> occured when wrapper handling message 1624892920. [2022-12-07 02:13:35,084 竞技场推送] ERROR: module 'hoshino.util' has no attribute 'filt_message' Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\msghandler.py", line 28, in handle_message await sf.func(bot, event) File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\modules\pcrjjc2_init_.py", line 269, in on_query_arena f'''昵称:{util.filt_message(str(res['user_info']["user_name"]))} AttributeError: module 'hoshino.util' has no attribute 'filt_message' [2022-12-07 02:13:35,099 nonebot] INFO: Message 1624892920 is ignored: Handled by RexTrigger of Hoshino

    opened by cadaeibf1 1
Releases(hoshinobot-res)
  • hoshinobot-res(Oct 16, 2022)

    Hoshino静态图片资源包

    声明

    本静态资源包内图片均来自互联网中可公开获取的资源,本资源包仅作整理搬运,著作权归原作者所有,切勿用于商业及非法用途!因本资源包而产生的利益纠纷及法律责任,由本资源包的直接使用者负责!

    使用方法

    解压本压缩包至任意位置,在HoshinoBot/config.py中配置RESOURCE_DIR路径 注意:路径应指向最外层文件夹,而非内层的img文件夹! 例如: 您解压本资源包至C:/Users/Yuuki/Downloads/res/则应配置 RESOURCE_DIR = "C:/Users/Yuuki/Downloads/res/" 文件夹priconne的路径应为"C:/Users/Yuuki/Downloads/res/img/priconne"

    更新资源请使用本资源包中的爬虫img/priconne/spider.py,启动前请修改需要爬取的范围,仅爬取需要的部分即可。使用前请务必爬取一下头像库,否则生成图片必报错!!! rank表等资源由于月度更新,来源较杂,如需更新请于Hoshino的后花园群中向bot索要,您也可以搬运其他rank表,搬运时请注意保留原作者信息。

    Source code(tar.gz)
    Source code(zip)
    res-20200501.zip(17.44 MB)
The projects lets you extract glossary words and their definitions from a given piece of text automatically using NLP techniques

Unsupervised technique to Glossary and Definition Extraction Code Files GPT2-DefinitionModel.ipynb - GPT-2 model for definition generation. Data_Gener

Prakhar Mishra 28 May 25, 2021
Code for ACL 2022 main conference paper "STEMM: Self-learning with Speech-text Manifold Mixup for Speech Translation".

STEMM: Self-learning with Speech-Text Manifold Mixup for Speech Translation This is a PyTorch implementation for the ACL 2022 main conference paper ST

ICTNLP 29 Oct 16, 2022
APEACH: Attacking Pejorative Expressions with Analysis on Crowd-generated Hate Speech Evaluation Datasets

APEACH - Korean Hate Speech Evaluation Datasets APEACH is the first crowd-generated Korean evaluation dataset for hate speech detection. Sentences of

Kevin-Yang 70 Dec 06, 2022
Understanding the Difficulty of Training Transformers

Admin Understanding the Difficulty of Training Transformers Guided by our analyses, we propose Adaptive Model Initialization (Admin), which successful

Liyuan Liu 300 Dec 29, 2022
Creating an LSTM model to generate music

Music-Generation Creating an LSTM model to generate music music-generator Used to create basic sin wave sounds music-ai Contains the functions to conv

Jerin Joseph 2 Dec 02, 2021
Yes it's true :broken_heart:

Information WARNING: No longer hosted If you would like to be on this repo's readme simply fork or star it! Forks 1 - Flowzii 2 - Errorcrafter 3 - vk-

Dropout 66 Dec 31, 2022
HuggingTweets - Train a model to generate tweets

HuggingTweets - Train a model to generate tweets Create in 5 minutes a tweet generator based on your favorite Tweeter Make my own model with the demo

Boris Dayma 318 Jan 04, 2023
Graph4nlp is the library for the easy use of Graph Neural Networks for NLP

Graph4NLP Graph4NLP is an easy-to-use library for R&D at the intersection of Deep Learning on Graphs and Natural Language Processing (i.e., DLG4NLP).

Graph4AI 1.5k Dec 23, 2022
Text to speech for Vietnamese, ez to use, ez to update

Chào mọi người, đây là dự án mở nhằm giúp việc đọc được trở nên dễ dàng hơn. Rất cảm ơn đội ngũ Zalo đã cung cấp hạ tầng để mình có thể tạo ra app này

Trần Cao Minh Bách 32 Jul 29, 2022
LewusBot - Twitch ChatBot built in python with twitchio library

LewusBot Twitch ChatBot built in python with twitchio library. Uses twitch/leagu

Lewus 25 Dec 04, 2022
Web Scraping, Document Deduplication & GPT-2 Fine-tuning with a newly created scam dataset.

Web Scraping, Document Deduplication & GPT-2 Fine-tuning with a newly created scam dataset.

18 Nov 28, 2022
New Modeling The Background CodeBase

Modeling the Background for Incremental Learning in Semantic Segmentation This is the updated official PyTorch implementation of our work: "Modeling t

Fabio Cermelli 9 Dec 28, 2022
A text file containing 479k English words for all your dictionary/word-based projects e.g: auto-completion / autosuggestion

List Of English Words A text file containing over 466k English words. While searching for a list of english words (for an auto-complete tutorial) I fo

dwyl 8.5k Jan 03, 2023
Nmt - TensorFlow Neural Machine Translation Tutorial

Neural Machine Translation (seq2seq) Tutorial Authors: Thang Luong, Eugene Brevdo, Rui Zhao (Google Research Blogpost, Github) This version of the tut

6.1k Dec 29, 2022
An assignment on creating a minimalist neural network toolkit for CS11-747

minnn by Graham Neubig, Zhisong Zhang, and Divyansh Kaushik This is an exercise in developing a minimalist neural network toolkit for NLP, part of Car

Graham Neubig 63 Dec 29, 2022
This is a Prototype of an Ai ChatBot "Tea and Coffee Supplier" using python.

Ai-ChatBot-Python A chatbot is an intelligent system which can hold a conversation with a human using natural language in real time. Due to the rise o

1 Oct 30, 2021
This is a modification of the OpenAI-CLIP repository of moein-shariatnia

This is a modification of the OpenAI-CLIP repository of moein-shariatnia

Sangwon Beak 2 Mar 04, 2022
LightSpeech: Lightweight and Fast Text to Speech with Neural Architecture Search

LightSpeech UnOfficial PyTorch implementation of LightSpeech: Lightweight and Fast Text to Speech with Neural Architecture Search.

Rishikesh (ऋषिकेश) 54 Dec 03, 2022
Easy to use, state-of-the-art Neural Machine Translation for 100+ languages

EasyNMT - Easy to use, state-of-the-art Neural Machine Translation This package provides easy to use, state-of-the-art machine translation for more th

Ubiquitous Knowledge Processing Lab 748 Jan 06, 2023
Curso práctico: NLP de cero a cien 🤗

Curso Práctico: NLP de cero a cien Comprende todos los conceptos y arquitecturas clave del estado del arte del NLP y aplícalos a casos prácticos utili

Somos NLP 147 Jan 06, 2023