本插件是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)
Use Tensorflow2.7.0 Build OpenAI'GPT-2

TF2_GPT-2 Use Tensorflow2.7.0 Build OpenAI'GPT-2 使用最新tensorflow2.7.0构建openai官方的GPT-2 NLP模型 优点 使用无监督技术 拥有大量词汇量 可实现续写(堪比“xx梦续写”) 实现对话后续将应用于FloatTech的Bot

Watermelon 9 Sep 13, 2022
edge-SR: Super-Resolution For The Masses

edge-SR: Super Resolution For The Masses Citation Pablo Navarrete Michelini, Yunhua Lu and Xingqun Jiang. "edge-SR: Super-Resolution For The Masses",

Pablo 40 Nov 10, 2022
Beyond Paragraphs: NLP for Long Sequences

Beyond Paragraphs: NLP for Long Sequences

AI2 338 Dec 02, 2022
Leon is an open-source personal assistant who can live on your server.

Leon Your open-source personal assistant. Website :: Documentation :: Roadmap :: Contributing :: Story 👋 Introduction Leon is an open-source personal

Leon AI 11.7k Dec 30, 2022
Modified GPT using average pooling to reduce the softmax attention memory constraints.

NLP-GPT-Upsampling This repository contains an implementation of Open AI's GPT Model. In particular, this implementation takes inspiration from the Ny

WD 1 Dec 03, 2021
Bpe algorithm can finetune tokenizer - Bpe algorithm can finetune tokenizer

"# bpe_algorithm_can_finetune_tokenizer" this is an implyment for https://github

张博 1 Feb 02, 2022
LSTC: Boosting Atomic Action Detection with Long-Short-Term Context

LSTC: Boosting Atomic Action Detection with Long-Short-Term Context This Repository contains the code on AVA of our ACM MM 2021 paper: LSTC: Boosting

Tencent YouTu Research 9 Oct 11, 2022
Pytorch implementation of winner from VQA Chllange Workshop in CVPR'17

2017 VQA Challenge Winner (CVPR'17 Workshop) pytorch implementation of Tips and Tricks for Visual Question Answering: Learnings from the 2017 Challeng

Mark Dong 166 Dec 11, 2022
Baseline code for Korean open domain question answering(ODQA)

Open-Domain Question Answering(ODQA)는 다양한 주제에 대한 문서 집합으로부터 자연어 질의에 대한 답변을 찾아오는 task입니다. 이때 사용자 질의에 답변하기 위해 주어지는 지문이 따로 존재하지 않습니다. 따라서 사전에 구축되어있는 Knowl

VUMBLEB 69 Nov 04, 2022
HiFi DeepVariant + WhatsHap workflowHiFi DeepVariant + WhatsHap workflow

HiFi DeepVariant + WhatsHap workflow Workflow steps align HiFi reads to reference with pbmm2 call small variants with DeepVariant, using two-pass meth

William Rowell 2 May 14, 2022
构建一个多源(公众号、RSS)、干净、个性化的阅读环境

2C 构建一个多源(公众号、RSS)、干净、个性化的阅读环境 作为一名微信公众号的重度用户,公众号一直被我设为汲取知识的地方。随着使用程度的增加,相信大家或多或少会有一个比较头疼的问题——广告问题。 假设你关注的公众号有十来个,若一个公众号两周接一次广告,理论上你会面临二十多次广告,实际上会更多,运

howie.hu 678 Dec 28, 2022
Implementation of "Adversarial purification with Score-based generative models", ICML 2021

Adversarial Purification with Score-based Generative Models by Jongmin Yoon, Sung Ju Hwang, Juho Lee This repository includes the official PyTorch imp

15 Dec 15, 2022
RecipeReduce: Simplified Recipe Processing for Lazy Programmers

RecipeReduce This repo will help you figure out the amount of ingredients to buy for a certain number of meals with selected recipes. RecipeReduce Get

Qibin Chen 9 Apr 22, 2022
Just Another Telegram Ai Chat Bot Written In Python With Pyrogram.

OkaeriChatBot Just another Telegram AI chat bot written in Python using Pyrogram. Requirements Python 3.7 or higher.

Wahyusaputra 2 Dec 23, 2021
A Word Level Transformer layer based on PyTorch and 🤗 Transformers.

Transformer Embedder A Word Level Transformer layer based on PyTorch and 🤗 Transformers. How to use Install the library from PyPI: pip install transf

Riccardo Orlando 27 Nov 20, 2022
A curated list of efficient attention modules

awesome-fast-attention A curated list of efficient attention modules

Sepehr Sameni 891 Dec 22, 2022
DLO8012: Natural Language Processing & CSL804: Computational Lab - II

NATURAL-LANGUAGE-PROCESSING-AND-COMPUTATIONAL-LAB-II DLO8012: NLP & CSL804: CL-II [SEMESTER VIII] Syllabus NLP - Reference Books THE WALL MEGA SATISH

AMEY THAKUR 7 Apr 28, 2022
A Python package implementing a new model for text classification with visualization tools for Explainable AI :octocat:

A Python package implementing a new model for text classification with visualization tools for Explainable AI 🍣 Online live demos: http://tworld.io/s

Sergio Burdisso 285 Jan 02, 2023
This project converts your human voice input to its text transcript and to an automated voice too.

Human Voice to Automated Voice & Text Introduction: In this project, whenever you'll speak, it will turn your voice into a robot voice and furthermore

Hassan Shahzad 3 Oct 15, 2021
This is the offline-training-pipeline for our project.

offline-training-pipeline This is the offline-training-pipeline for our project. We adopt the offline training and online prediction Machine Learning

0 Apr 22, 2022