diff --git a/CHANGELOG.md b/CHANGELOG.md index 200b7d0..995d4b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # Release Notes # 本项目Log +## v0.3.0.200316 alpha (2020-03-169) + +### Added +- 添加异常处理(通知) +- + +### Changed +- + +### Fixed +- 修复活跃弹幕 +- 修复风纪测试 +- 修复部分已知 +- + ## v0.3.0.200312 alpha (2020-03-12) ### Added diff --git a/DOC.md b/DOC.md index 5e600d0..518562d 100644 --- a/DOC.md +++ b/DOC.md @@ -2,7 +2,7 @@

- +

@@ -15,29 +15,30 @@ B 站直播实用脚本 |plugin |version |description | |--------------------|--------------------|--------------------| -|Login |20.03.12 |账号登录 | -|Sleep |20.03.12 |休眠控制 | -|MasterSite |20.03.12 |主站助手 | -|Daily |20.03.12 |每日礼包 | -|Heart |20.03.12 |双端心跳 | -|Task |20.03.12 |每日任务 | -|Silver |20.03.12 |银瓜子宝箱 | -|Barrage |20.03.12 |活跃弹幕 | -|Silver2Coin |20.03.12 |银瓜子换硬币 | -|GiftSend |20.03.12 |礼物赠送 | -|GroupSignIn |20.03.12 |友爱社签到 | -|ManGa |20.03.12 |漫画签到分享 | -|GiftHeart |20.03.12 |心跳礼物 | -|MaterialObject |20.03.12 |实物抽奖 | -|AloneTcpClient |20.03.12 |独立监控 | -|ZoneTcpClient |20.03.12 |分区监控 | -|StormRaffle |20.03.12 |节奏风暴 | -|GiftRaffle |20.03.12 |活动礼物 | -|PkRaffle |20.03.12 |大乱斗 | -|GuardRaffle |20.03.12 |舰长总督 | -|AnchorRaffle |20.03.12 |天选时刻 | -|AwardRecord |20.03.12 |获奖通知 | -|Statistics |20.03.12 |数据统计 | +|Login |20.03.16 |账号登录 | +|Sleep |20.03.16 |休眠控制 | +|MasterSite |20.03.16 |主站助手 | +|Daily |20.03.16 |每日礼包 | +|Heart |20.03.16 |双端心跳 | +|Task |20.03.16 |每日任务 | +|Silver |20.03.16 |银瓜子宝箱 | +|Barrage |20.03.16 |活跃弹幕 | +|Silver2Coin |20.03.16 |银瓜子换硬币 | +|GiftSend |20.03.16 |礼物赠送 | +|Judge |20.03.16 |风纪 | +|GroupSignIn |20.03.16 |友爱社签到 | +|ManGa |20.03.16 |漫画签到分享 | +|GiftHeart |20.03.16 |心跳礼物 | +|MaterialObject |20.03.16 |实物抽奖 | +|AloneTcpClient |20.03.16 |独立监控 | +|ZoneTcpClient |20.03.16 |分区监控 | +|StormRaffle |20.03.16 |节奏风暴 | +|GiftRaffle |20.03.16 |活动礼物 | +|PkRaffle |20.03.16 |大乱斗 | +|GuardRaffle |20.03.16 |舰长总督 | +|AnchorRaffle |20.03.16 |天选时刻 | +|AwardRecord |20.03.16 |获奖通知 | +|Statistics |20.03.16 |数据统计 | ## 打赏赞助 diff --git a/README.md b/README.md index 148cc03..f342a0d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Group: [55308141](https://jq.qq.com/?_wv=1027&k=5AIDaJg) ## 公告 -Currently for Personal Edition **0.3.0.200312 alpha** +Currently for Personal Edition **0.3.0.200316 alpha** ## 文档 diff --git a/composer.lock b/composer.lock index ede6539..d80cb04 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e56d20f6a534d503ecfa6c7f58bf88a", + "content-hash": "e12b1349c43efa1aa58a89b33a44613e", "packages": [ { "name": "amphp/amp", @@ -89,727 +89,6 @@ ], "time": "2020-02-10T18:10:57+00:00" }, - { - "name": "amphp/byte-stream", - "version": "v1.7.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/1e52f1752b2e20e2a7e464476ef887a2388e3832", - "reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "friendsofphp/php-cs-fixer": "^2.3", - "infection/infection": "^0.9.3", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\ByteStream\\": "lib" - }, - "files": [ - "lib/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "time": "2020-01-29T18:22:23+00:00" - }, - { - "name": "amphp/cache", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/cache.git", - "reference": "14d9fa01a2518eda31b10a421660b41a55249736" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/cache/zipball/14d9fa01a2518eda31b10a421660b41a55249736", - "reference": "14d9fa01a2518eda31b10a421660b41a55249736", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2", - "amphp/sync": "^1.2", - "php": ">=7.1" - }, - "conflict": { - "amphp/file": "<0.2 || >=2" - }, - "require-dev": { - "amphp/file": "^1.0", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6 | ^7 | ^8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Cache\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - } - ], - "description": "A promise-aware caching API for Amp.", - "homepage": "https://github.com/amphp/cache", - "time": "2019-11-29T18:47:04+00:00" - }, - { - "name": "amphp/dns", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/dns.git", - "reference": "9d7e57f37d21bfed8ff2e78db52b99d45ce0c215" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/9d7e57f37d21bfed8ff2e78db52b99d45ce0c215", - "reference": "9d7e57f37d21bfed8ff2e78db52b99d45ce0c215", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.1", - "amphp/cache": "^1.2", - "amphp/parser": "^1", - "amphp/windows-registry": "^0.3", - "daverandom/libdns": "^2.0.1", - "ext-filter": "*", - "ext-json": "*", - "php": ">=7.0" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Dns\\": "lib" - }, - "files": [ - "lib/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Wright", - "email": "addr@daverandom.com" - }, - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "Async DNS resolution for Amp.", - "homepage": "https://github.com/amphp/dns", - "keywords": [ - "amp", - "amphp", - "async", - "client", - "dns", - "resolve" - ], - "time": "2019-11-28T20:10:22+00:00" - }, - { - "name": "amphp/hpack", - "version": "v3.1.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/hpack.git", - "reference": "0dcd35f9a8d9fc04d5fb8af0aeb109d4474cfad8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/0dcd35f9a8d9fc04d5fb8af0aeb109d4474cfad8", - "reference": "0dcd35f9a8d9fc04d5fb8af0aeb109d4474cfad8", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "http2jp/hpack-test-case": "^1", - "phpunit/phpunit": "^6 | ^7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Http\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Bob Weinand" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "HTTP/2 HPack implementation.", - "homepage": "https://github.com/amphp/hpack", - "keywords": [ - "headers", - "hpack", - "http-2" - ], - "time": "2020-01-11T19:33:14+00:00" - }, - { - "name": "amphp/http", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/http.git", - "reference": "8a1a1d6a78e6f432618aea02c6351602cf735cef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/8a1a1d6a78e6f432618aea02c6351602cf735cef", - "reference": "8a1a1d6a78e6f432618aea02c6351602cf735cef", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/hpack": "^3", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^7 || ^6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Amp\\Http\\": "src" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Basic HTTP primitives which can be shared by servers and clients.", - "time": "2020-01-14T17:41:56+00:00" - }, - { - "name": "amphp/http-client", - "version": "v4.2.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/http-client.git", - "reference": "7ab9ee09c29865133a54060267665c7ad7c6fb17" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/7ab9ee09c29865133a54060267665c7ad7c6fb17", - "reference": "7ab9ee09c29865133a54060267665c7ad7c6fb17", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2.4", - "amphp/byte-stream": "^1.6", - "amphp/hpack": "^3", - "amphp/http": "^1.6", - "amphp/socket": "^1", - "amphp/sync": "^1.3", - "league/uri": "^6", - "php": ">=7.2", - "psr/http-message": "^1" - }, - "conflict": { - "amphp/file": "<0.2 || >=2" - }, - "require-dev": { - "amphp/file": "^1 || ^0.3 || ^0.2", - "amphp/http-server": "^2-rc4", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "ext-json": "*", - "phpunit/phpunit": "^7 || ^8" - }, - "suggest": { - "amphp/file": "Required for file request bodies and HTTP archive logging", - "ext-json": "Required for logging HTTP archives", - "ext-zlib": "Allows using compression for response bodies." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Amp\\Http\\Client\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@gmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "Asynchronous concurrent HTTP/2 and HTTP/1.1 client built on the Amp concurrency framework", - "homepage": "https://github.com/amphp/http-client", - "keywords": [ - "async", - "client", - "concurrent", - "http", - "non-blocking", - "rest" - ], - "time": "2020-03-07T18:12:27+00:00" - }, - { - "name": "amphp/parser", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/parser.git", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.3", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Parser\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "A generator parser to make streaming parsers simple.", - "homepage": "https://github.com/amphp/parser", - "keywords": [ - "async", - "non-blocking", - "parser", - "stream" - ], - "time": "2017-06-06T05:29:10+00:00" - }, - { - "name": "amphp/process", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/process.git", - "reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/355b1e561b01c16ab3d78fada1ad47ccc96df70e", - "reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "php": ">=7" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Process\\": "lib" - }, - "files": [ - "lib/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "Asynchronous process manager.", - "homepage": "https://github.com/amphp/process", - "time": "2019-02-26T16:33:03+00:00" - }, - { - "name": "amphp/socket", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/socket.git", - "reference": "020b65271596f84f4b3127d2eab81ad2790f9fb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/020b65271596f84f4b3127d2eab81ad2790f9fb6", - "reference": "020b65271596f84f4b3127d2eab81ad2790f9fb6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6", - "amphp/dns": "^1 || ^0.9", - "ext-openssl": "*", - "kelunik/certificate": "^1.1", - "league/uri-parser": "^1.4", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Amp\\Socket\\": "src" - }, - "files": [ - "src/functions.php", - "src/Internal/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@gmail.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Async socket connection / server tools for Amp.", - "homepage": "https://github.com/amphp/socket", - "keywords": [ - "amp", - "async", - "encryption", - "non-blocking", - "sockets", - "tcp", - "tls" - ], - "time": "2020-02-27T21:29:37+00:00" - }, - { - "name": "amphp/sync", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/sync.git", - "reference": "512d62e83c8b8d5c848183005c70e70df2bcca55" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/512d62e83c8b8d5c848183005c70e70df2bcca55", - "reference": "512d62e83c8b8d5c848183005c70e70df2bcca55", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2.2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Sync\\": "src" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Stephen Coakley", - "email": "me@stephencoakley.com" - } - ], - "description": "Mutex, Semaphore, and other synchronization tools for Amp.", - "homepage": "https://github.com/amphp/sync", - "keywords": [ - "async", - "asynchronous", - "mutex", - "semaphore", - "synchronization" - ], - "time": "2019-11-08T18:42:56+00:00" - }, - { - "name": "amphp/windows-registry", - "version": "v0.3.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/windows-registry.git", - "reference": "834af7a30ad7c006b0326ccd2686ddc6e6943366" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/windows-registry/zipball/834af7a30ad7c006b0326ccd2686ddc6e6943366", - "reference": "834af7a30ad7c006b0326ccd2686ddc6e6943366", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "amphp/process": "^1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\WindowsRegistry\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Windows Registry Reader.", - "time": "2018-10-24T03:34:54+00:00" - }, { "name": "bramus/ansi-php", "version": "3.0.3", @@ -965,52 +244,6 @@ ], "time": "2019-10-28T12:32:07+00:00" }, - { - "name": "daverandom/libdns", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/DaveRandom/LibDNS.git", - "reference": "e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9", - "reference": "e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-ctype": "*", - "php": ">=7.0" - }, - "suggest": { - "ext-intl": "Required for IDN support" - }, - "type": "library", - "autoload": { - "psr-4": { - "LibDNS\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "DNS protocol implementation written in pure PHP", - "keywords": [ - "dns" - ], - "time": "2019-12-03T09:12:46+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "6.5.2", @@ -1218,283 +451,6 @@ ], "time": "2019-07-01T23:21:34+00:00" }, - { - "name": "kelunik/certificate", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/kelunik/certificate.git", - "reference": "56542e62d51533d04d0a9713261fea546bff80f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kelunik/certificate/zipball/56542e62d51533d04d0a9713261fea546bff80f6", - "reference": "56542e62d51533d04d0a9713261fea546bff80f6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-openssl": "*", - "php": ">=5.4" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.9", - "phpunit/phpunit": "^4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Kelunik\\Certificate\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Access certificate details and transform between different formats.", - "keywords": [ - "DER", - "certificate", - "certificates", - "openssl", - "pem", - "x509" - ], - "time": "2019-05-29T19:02:31+00:00" - }, - { - "name": "league/uri", - "version": "6.2.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri.git", - "reference": "7b29ca33b287b4277d5ce7c26bc1be5d4118b484" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/7b29ca33b287b4277d5ce7c26bc1be5d4118b484", - "reference": "7b29ca33b287b4277d5ce7c26bc1be5d4118b484", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.1", - "php": "^7.2", - "psr/http-message": "^1.0" - }, - "conflict": { - "league/uri-schemes": "^1.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 | ^8.0" - }, - "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "URI manipulation library", - "homepage": "http://uri.thephpleague.com", - "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "middleware", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", - "rfc3986", - "rfc3987", - "rfc6570", - "uri", - "uri-template", - "url", - "ws" - ], - "time": "2020-02-08T16:31:57+00:00" - }, - { - "name": "league/uri-interfaces", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "0068a469958895ceaf3afcb489c0258adfa1e406" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/0068a469958895ceaf3afcb489c0258adfa1e406", - "reference": "0068a469958895ceaf3afcb489c0258adfa1e406", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "php": "^7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0|^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", - "keywords": [ - "rfc3986", - "rfc3987", - "uri", - "url" - ], - "time": "2020-02-08T12:10:37+00:00" - }, - { - "name": "league/uri-parser", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri-parser.git", - "reference": "671548427e4c932352d9b9279fdfa345bf63fa00" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-parser/zipball/671548427e4c932352d9b9279fdfa345bf63fa00", - "reference": "671548427e4c932352d9b9279fdfa345bf63fa00", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", - "phpstan/phpstan-strict-rules": "^0.9.0", - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-intl": "Allow parsing RFC3987 compliant hosts", - "league/uri-schemes": "Allow validating and normalizing URI parsing results" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "src" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "userland URI parser RFC 3986 compliant", - "homepage": "https://github.com/thephpleague/uri-parser", - "keywords": [ - "parse_url", - "parser", - "rfc3986", - "rfc3987", - "uri", - "url" - ], - "time": "2018-11-22T07:55:51+00:00" - }, { "name": "monolog/monolog", "version": "1.25.3", @@ -1861,16 +817,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.1.1", + "version": "v4.1.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "32bd5ca5a4170f88e27073353013d210a3354ae9" + "reference": "939dfda2d7267ac8fc53ac3d642b5de357554c39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/32bd5ca5a4170f88e27073353013d210a3354ae9", - "reference": "32bd5ca5a4170f88e27073353013d210a3354ae9", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/939dfda2d7267ac8fc53ac3d642b5de357554c39", + "reference": "939dfda2d7267ac8fc53ac3d642b5de357554c39", "shasum": "", "mirrors": [ { @@ -1925,7 +881,7 @@ "env", "environment" ], - "time": "2020-03-01T23:56:01+00:00" + "time": "2020-03-12T13:44:15+00:00" } ], "packages-dev": [], diff --git a/src/core/App.php b/src/core/App.php index 0039c23..6a03812 100644 --- a/src/core/App.php +++ b/src/core/App.php @@ -13,6 +13,8 @@ namespace BiliHelper\Core; use Amp\Delayed; use Amp\Loop; use function Amp\asyncCall; +use BiliHelper\Plugin\Notice; + class App { @@ -22,6 +24,8 @@ class App public function __construct() { set_time_limit(0); + error_reporting(E_ALL); + ini_set('display_errors', 'on'); header("Content-Type:text/html; charset=utf-8"); date_default_timezone_set('Asia/Shanghai'); if (PHP_SAPI != 'cli') { @@ -37,7 +41,6 @@ class App */ public function load($app_path, $load_file = 'user.conf') { - // define('APP_PATH', dirname(__DIR__)); define('APP_PATH', $app_path); Config::load($load_file); return $this; @@ -51,11 +54,16 @@ class App { asyncCall(function () use ($taskName) { while (true) { - call_user_func(array('BiliHelper\Plugin\\' . $taskName, 'run'), []); + try { + call_user_func(array('BiliHelper\Plugin\\' . $taskName, 'run'), []); + } catch (\Throwable $e) { + $error_msg = "MSG: {$e->getMessage()} CODE: {$e->getCode()} FILE: {$e->getFile()} LINE: {$e->getLine()}"; + Log::error($error_msg); + Notice::push('error', $error_msg); + } yield new Delayed(1000); } }); - } /** diff --git a/src/plugin/Barrage.php b/src/plugin/Barrage.php index d502f6b..43f9f5e 100644 --- a/src/plugin/Barrage.php +++ b/src/plugin/Barrage.php @@ -91,9 +91,9 @@ class Barrage /** * @use 弹幕通用模块 * @param $info - * @return bool|string + * @return array */ - private static function sendMsg($info) + private static function sendMsg($info): array { $user_info = User::parseCookies(); $url = 'https://api.live.bilibili.com/msg/send'; @@ -108,7 +108,8 @@ class Barrage 'csrf' => $user_info['token'], 'csrf_token' => $user_info['token'], ]; - return Curl::post('app', $url, Sign::common($payload)); + $raw = Curl::post('app', $url, Sign::common($payload)); + return json_decode($raw, true) ?? ['code' => 404, 'msg' => '上层数据为空!']; } /** @@ -116,21 +117,16 @@ class Barrage * @param $info * @return bool */ - private static function privateSendMsg($info) + private static function privateSendMsg($info): bool { //TODO 暂时性功能 有需求就修改 - $raw = self::sendMsg($info); - $de_raw = json_decode($raw, true); - if ($de_raw['code'] == 1001) { - Log::warning($de_raw['msg']); - return false; - } - if (!$de_raw['code']) { + $response = self::sendMsg($info); + if (isset($response['code']) && $response['code'] == 0) { Log::info('活跃弹幕发送成功!'); return true; + } else { + Log::warning("活跃代码发送失败, CODE -> {$response['code']} MSG -> {$response['msg']} "); + return false; } - Log::error("活跃弹幕发送失败!, {$de_raw['msg']}"); - - return false; } } \ No newline at end of file diff --git a/src/plugin/Judge.php b/src/plugin/Judge.php index 0ca1468..4ac182c 100644 --- a/src/plugin/Judge.php +++ b/src/plugin/Judge.php @@ -36,11 +36,11 @@ class Judge return; } // self::judgementIndex(); - self::setLock(mt_rand(6, 10) * 60); + self::setLock(mt_rand(15, 30) * 60); } /** - * @use 判案 + * @use 判案 TODO: 处理案例已满(MAX20例) / 尝试已实名续期风纪 * @param $case_id * @return bool */ @@ -173,8 +173,10 @@ class Judge ]; $raw = Curl::post('pc', $url, $payload); $de_raw = json_decode($raw, true); + // {"code":25008,"message":"真给力 , 移交众裁的举报案件已经被处理完了","ttl":1} + // {"code":25014,"message":"25014","ttl":1} + // {"code":25005,"message":"请成为风纪委员后再试","ttl":1} if (isset($de_raw['code']) && $de_raw['code'] == 25005) { - // {"code":25005,"message":"请成为风纪委员后再试","ttl":1} Log::warning($de_raw['message']); self::setLock(24 * 60 * 60); return null; diff --git a/src/plugin/Live.php b/src/plugin/Live.php index 36f92a1..547c3fd 100644 --- a/src/plugin/Live.php +++ b/src/plugin/Live.php @@ -112,6 +112,9 @@ class Live public static function getRealRoomID($room_id) { $data = self::getRoomInfo($room_id); + if (!isset($data['code']) || !isset($data['data'])) { + return false; + } if ($data['code']) { Log::warning($room_id . ' : ' . $data['msg']); return false; @@ -140,7 +143,7 @@ class Live 'id' => $room_id ]; $raw = Curl::get('other', $url, $payload); - return json_decode($raw, true);; + return json_decode($raw, true); } diff --git a/src/plugin/MasterSite.php b/src/plugin/MasterSite.php index b896e66..5004142 100644 --- a/src/plugin/MasterSite.php +++ b/src/plugin/MasterSite.php @@ -75,7 +75,7 @@ class MasterSite $raw = Curl::get('pc', $url, $payload); $de_raw = json_decode($raw, true); - $logs = $de_raw['data']['list']; + $logs = isset($de_raw['data']['list']) ? $de_raw['data']['list'] : []; $coins = 0; foreach ($logs as $log) { $log_ux = strtotime($log['time']); @@ -100,9 +100,8 @@ class MasterSite return $coins; } - /** - * @use 投币视频 + * @use 视频投币 TODO : 处理视频投币硬币少于需要投币数 * @return bool * @throws \Exception */ diff --git a/src/plugin/Notice.php b/src/plugin/Notice.php index 0085cf7..47ef04d 100644 --- a/src/plugin/Notice.php +++ b/src/plugin/Notice.php @@ -110,6 +110,12 @@ class Notice 'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 账号被封禁: 程序开始睡眠,凌晨自动唤醒,距离唤醒还有' . self::$result . '小时', ]; break; + case 'error': + $info = [ + 'title' => '程序错误', + 'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 程序运行错误: ' . self::$result, + ]; + break; default: $info = [ 'title' => '推送消息异常记录',