本插件是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)
Simple python code to fix your combo list by removing any text after a separator or removing duplicate combos

Combo List Fixer A simple python code to fix your combo list by removing any text after a separator or removing duplicate combos Removing any text aft

Hamidreza Dehghan 3 Dec 05, 2022
PIZZA - a task-oriented semantic parsing dataset

The PIZZA dataset continues the exploration of task-oriented parsing by introducing a new dataset for parsing pizza and drink orders, whose semantics cannot be captured by flat slots and intents.

17 Dec 14, 2022
Twitter-Sentiment-Analysis - Analysis of twitter posts' positive and negative score.

Twitter-Sentiment-Analysis The hands-on project is in Python 3 Programming class offered by University of Michigan via Coursera. The task is to build

Eszter Pai 1 Jan 03, 2022
apple's universal binaries BUT MUCH WORSE (PRACTICAL SHITPOST) (NOT PRODUCTION READY)

hyperuniversality investment opportunity: what if we could run multiple architectures in a single file, again apple universal binaries, but worse how

luna 2 Oct 19, 2021
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
Gathers machine learning and Tensorflow deep learning models for NLP problems, 1.13 < Tensorflow < 2.0

NLP-Models-Tensorflow, Gathers machine learning and tensorflow deep learning models for NLP problems, code simplify inside Jupyter Notebooks 100%. Tab

HUSEIN ZOLKEPLI 1.7k Dec 30, 2022
Sentiment Analysis Project using Count Vectorizer and TF-IDF Vectorizer

Sentiment Analysis Project This project contains two sentiment analysis programs for Hotel Reviews using a Hotel Reviews dataset from Datafiniti. The

Simran Farrukh 0 Mar 28, 2022
Pipeline for chemical image-to-text competition

BMS-Molecular-Translation Introduction This is a pipeline for Bristol-Myers Squibb – Molecular Translation by Vadim Timakin and Maksim Zhdanov. We got

Maksim Zhdanov 7 Sep 20, 2022
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch

Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoenc

Venelin Valkov 1.8k Dec 31, 2022
Various Algorithms for Short Text Mining

Short Text Mining in Python Introduction This package shorttext is a Python package that facilitates supervised and unsupervised learning for short te

Kwan-Yuet 466 Dec 06, 2022
Code for "Generating Disentangled Arguments with Prompts: a Simple Event Extraction Framework that Works"

GDAP The code of paper "Code for "Generating Disentangled Arguments with Prompts: a Simple Event Extraction Framework that Works"" Event Datasets Prep

45 Oct 29, 2022
A telegram bot to translate 100+ Languages

🔥 GOOGLE TRANSLATER 🔥 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🔰 Deploy To Railway 🔰 • • ✅ OFF

Aɴᴋɪᴛ Kᴜᴍᴀʀ 5 Dec 20, 2021
Modular and extensible speech recognition library leveraging pytorch-lightning and hydra.

Lightning ASR Modular and extensible speech recognition library leveraging pytorch-lightning and hydra What is Lightning ASR • Installation • Get Star

Soohwan Kim 40 Sep 19, 2022
Free and Open Source Machine Translation API. 100% self-hosted, offline capable and easy to setup.

LibreTranslate Try it online! | API Docs | Community Forum Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it d

3.4k Dec 27, 2022
Ecommerce product title recognition package

revizor This package solves task of splitting product title string into components, like type, brand, model and article (or SKU or product code or you

Bureaucratic Labs 16 Mar 03, 2022
:P Some basic stuff I'm gonna use for my upcoming Agile Software Development and Devops

reverse-image-search-py bash script.sh img_name.jpg Requirements pip install requests pip install pyshorteners Dry run [ Sudhanva M 3 Dec 18, 2021

Beautiful visualizations of how language differs among document types.

Scattertext 0.1.0.0 A tool for finding distinguishing terms in corpora and displaying them in an interactive HTML scatter plot. Points corresponding t

Jason S. Kessler 2k Dec 27, 2022
🤖 Basic Financial Chatbot with handoff ability built with Rasa

Financial Services Example Bot This is an example chatbot demonstrating how to build AI assistants for financial services and banking with Rasa. It in

Mohammad Javad Hossieni 4 Aug 10, 2022
基于pytorch+bert的中文事件抽取

pytorch_bert_event_extraction 基于pytorch+bert的中文事件抽取,主要思想是QA(问答)。 要预先下载好chinese-roberta-wwm-ext模型,并在运行时指定模型的位置。

西西嘛呦 31 Nov 30, 2022
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

VAENAR-TTS - PyTorch Implementation PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

Keon Lee 67 Nov 14, 2022