本插件是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)
PyTorch implementation of Microsoft's text-to-speech system FastSpeech 2: Fast and High-Quality End-to-End Text to Speech.

An implementation of Microsoft's "FastSpeech 2: Fast and High-Quality End-to-End Text to Speech"

Chung-Ming Chien 1k Dec 30, 2022
Search for documents in a domain through Google. The objective is to extract metadata

MetaFinder - Metadata search through Google _____ __ ___________ .__ .___ / \

Josué Encinar 85 Dec 16, 2022
The (extremely) naive sentiment classification function based on NBSVM trained on wisesight_sentiment

thai_sentiment The naive sentiment classification function based on NBSVM trained on wisesight_sentiment วิธีติดตั้ง pip install thai_sentiment==0.1.3

Charin 7 Dec 08, 2022
Main repository for the chatbot Bobotinho.

Bobotinho Bot Main repository for the chatbot Bobotinho. ℹ️ Introduction Twitch chatbot with entertainment commands. ‎ 💻 Technologies Concurrent code

Bobotinho 14 Nov 29, 2022
A simple word search made in python

Word Search Puzzle A simple word search made in python Usage $ python3 main.py -h usage: main.py [-h] [-c] [-f FILE] Generates a word s

Magoninho 16 Mar 10, 2022
A Multi-modal Model Chinese Spell Checker Released on ACL2021.

ReaLiSe ReaLiSe is a multi-modal Chinese spell checking model. This the office code for the paper Read, Listen, and See: Leveraging Multimodal Informa

DaDa 106 Dec 29, 2022
Deep Learning for Natural Language Processing - Lectures 2021

This repository contains slides for the course "20-00-0947: Deep Learning for Natural Language Processing" (Technical University of Darmstadt, Summer term 2021).

0 Feb 21, 2022
Repository for Graph2Pix: A Graph-Based Image to Image Translation Framework

Graph2Pix: A Graph-Based Image to Image Translation Framework Installation Install the dependencies in env.yml $ conda env create -f env.yml $ conda a

18 Nov 17, 2022
Linear programming solver for paper-reviewer matching and mind-matching

Paper-Reviewer Matcher A python package for paper-reviewer matching algorithm based on topic modeling and linear programming. The algorithm is impleme

Titipat Achakulvisut 66 Jul 05, 2022
Google and Stanford University released a new pre-trained model called ELECTRA

Google and Stanford University released a new pre-trained model called ELECTRA, which has a much compact model size and relatively competitive performance compared to BERT and its variants. For furth

Yiming Cui 1.2k Dec 30, 2022
PyTorch implementation of the paper: Text is no more Enough! A Benchmark for Profile-based Spoken Language Understanding

Text is no more Enough! A Benchmark for Profile-based Spoken Language Understanding This repository contains the official PyTorch implementation of th

Xiao Xu 26 Dec 14, 2022
A library for end-to-end learning of embedding index and retrieval model

Poeem Poeem is a library for efficient approximate nearest neighbor (ANN) search, which has been widely adopted in industrial recommendation, advertis

54 Dec 21, 2022
PyTorch implementation of NATSpeech: A Non-Autoregressive Text-to-Speech Framework

A Non-Autoregressive Text-to-Speech (NAR-TTS) framework, including official PyTorch implementation of PortaSpeech (NeurIPS 2021) and DiffSpeech (AAAI 2022)

760 Jan 03, 2023
Finetune gpt-2 in google colab

gpt-2-colab finetune gpt-2 in google colab sample result (117M) from retraining on A Tale of Two Cities by Charles Di

212 Jan 02, 2023
Beyond Accuracy: Behavioral Testing of NLP models with CheckList

CheckList This repository contains code for testing NLP Models as described in the following paper: Beyond Accuracy: Behavioral Testing of NLP models

Marco Tulio Correia Ribeiro 1.8k Dec 28, 2022
End-to-end MLOps pipeline of a BERT model for emotion classification.

image source EmoBERT-MLOps The goal of this repository is to build an end-to-end MLOps pipeline based on the MLOps course from Made with ML, but this

Dimitre Oliveira 4 Nov 06, 2022
A tool helps build a talk preview image by combining the given background image and talk event description

talk-preview-img-builder A tool helps build a talk preview image by combining the given background image and talk event description Installation and U

PyCon Taiwan 4 Aug 20, 2022
Code to reprudece NeurIPS paper: Accelerated Sparse Neural Training: A Provable and Efficient Method to Find N:M Transposable Masks

Accelerated Sparse Neural Training: A Provable and Efficient Method to FindN:M Transposable Masks Recently, researchers proposed pruning deep neural n

itay hubara 4 Feb 23, 2022
Natural Language Processing Best Practices & Examples

NLP Best Practices In recent years, natural language processing (NLP) has seen quick growth in quality and usability, and this has helped to drive bus

Microsoft 6.1k Dec 31, 2022