mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 20:33:01 +08:00
Merge branch 'main' into feat/parse-target
This commit is contained in:
commit
d04b082e06
@ -159,9 +159,9 @@ jobs:
|
|||||||
# - run: sed -e '41,45d' -i pyproject.toml
|
# - run: sed -e '41,45d' -i pyproject.toml
|
||||||
- python/install-packages:
|
- python/install-packages:
|
||||||
pkg-manager: poetry
|
pkg-manager: poetry
|
||||||
- run:
|
# - run:
|
||||||
name: Install browser
|
# name: Install browser
|
||||||
command: poetry run playwright install-deps && poetry run playwright install chromium
|
# command: poetry run playwright install-deps && poetry run playwright install chromium
|
||||||
- run:
|
- run:
|
||||||
name: Coverage test
|
name: Coverage test
|
||||||
command: poetry run pytest --cov-report html --cov-report xml --cov=./src/plugins/nonebot_bison --junitxml=test-results/junit.xml
|
command: poetry run pytest --cov-report html --cov-report xml --cov=./src/plugins/nonebot_bison --junitxml=test-results/junit.xml
|
||||||
@ -213,5 +213,6 @@ jobs:
|
|||||||
name: Publish to Github Release
|
name: Publish to Github Release
|
||||||
command: |
|
command: |
|
||||||
go install github.com/tcnksm/ghr@latest
|
go install github.com/tcnksm/ghr@latest
|
||||||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./dist
|
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} \
|
||||||
|
-delete ${CIRCLE_TAG} -n ${CIRCLE_TAG} -b $(git log --format=%B -n 1 $CIRCLE_SHA1) ./dist
|
||||||
|
|
||||||
|
14
.github/actions/build-docs/action.yml
vendored
Normal file
14
.github/actions/build-docs/action.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Build Docs
|
||||||
|
description: Build Docs
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
yarn docs:build
|
15
.github/actions/build-frontend/action.yml
vendored
Normal file
15
.github/actions/build-frontend/action.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Build Frontend
|
||||||
|
description: Build Frontend
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
shell: bash
|
||||||
|
working-directory: ./admin-frontend
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
yarn build
|
18
.github/actions/setup-node/action.yml
vendored
Normal file
18
.github/actions/setup-node/action.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: Setup Node
|
||||||
|
description: Setup Node
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: "16"
|
||||||
|
|
||||||
|
- id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
40
.github/actions/setup-python/action.yml
vendored
Normal file
40
.github/actions/setup-python/action.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Setup Python
|
||||||
|
description: Setup Python
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
python-version:
|
||||||
|
description: Python version
|
||||||
|
required: false
|
||||||
|
default: "3.9"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ inputs.python-version }}
|
||||||
|
|
||||||
|
- name: Install poetry
|
||||||
|
uses: Gr1N/setup-poetry@v7
|
||||||
|
|
||||||
|
- name: Cache Windows dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
if: ${{ runner.os == 'Windows' }}
|
||||||
|
with:
|
||||||
|
path: ~/AppData/Local/pypoetry/Cache/virtualenvs
|
||||||
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
|
||||||
|
- name: Cache Linux dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
if: ${{ runner.os == 'Linux' }}
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pypoetry/virtualenvs
|
||||||
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
|
||||||
|
- name: Cache macOS dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
with:
|
||||||
|
path: ~/Library/Caches/pypoetry/virtualenvs
|
||||||
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
36
.github/release-drafter.yml
vendored
Normal file
36
.github/release-drafter.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
template: $CHANGES
|
||||||
|
category-template: "### $TITLE"
|
||||||
|
name-template: "Release v$RESOLVED_VERSION 🌈"
|
||||||
|
tag-template: "v$RESOLVED_VERSION"
|
||||||
|
change-template: "- $TITLE [@$AUTHOR](https://github.com/$AUTHOR) ([#$NUMBER]($URL))"
|
||||||
|
change-title-escapes: '\<&'
|
||||||
|
exclude-labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "skip-changelog"
|
||||||
|
categories:
|
||||||
|
- title: "破坏性变更"
|
||||||
|
labels:
|
||||||
|
- "Breaking"
|
||||||
|
- title: "新功能"
|
||||||
|
labels:
|
||||||
|
- "feature"
|
||||||
|
- "enhancement"
|
||||||
|
- title: "Bug 修复"
|
||||||
|
labels:
|
||||||
|
- "fix"
|
||||||
|
- "bugfix"
|
||||||
|
- "bug"
|
||||||
|
- title: "文档"
|
||||||
|
labels:
|
||||||
|
- "documentation"
|
||||||
|
version-resolver:
|
||||||
|
major:
|
||||||
|
labels:
|
||||||
|
- "major"
|
||||||
|
minor:
|
||||||
|
labels:
|
||||||
|
- "minor"
|
||||||
|
patch:
|
||||||
|
labels:
|
||||||
|
- "patch"
|
||||||
|
default: patch
|
108
.github/workflows/main.yml
vendored
Normal file
108
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-frontend:
|
||||||
|
name: Build Frontend
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
uses: ./.github/actions/build-frontend
|
||||||
|
|
||||||
|
- name: Upload dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./admin-frontend/build/
|
||||||
|
test:
|
||||||
|
name: Test Coverage
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: build-frontend
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.9", "3.10"]
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
fail-fast: false
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download frontend files
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
||||||
|
|
||||||
|
- name: Setup Python environment
|
||||||
|
uses: ./.github/actions/setup-python
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install prerequisites
|
||||||
|
run: poetry install
|
||||||
|
|
||||||
|
- name: Run Pytest
|
||||||
|
run: poetry run pytest --cov-report xml --cov=./src/plugins/nonebot_bison -k 'not compare and not render'
|
||||||
|
|
||||||
|
- name: Upload coverage report
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
env_vars: OS,PYTHON_VERSION
|
||||||
|
docker:
|
||||||
|
name: Docker
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-frontend, test]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- file: ./docker/Dockerfile_with_frontend
|
||||||
|
tags: felinae98/nonebot-bison:main
|
||||||
|
- file: ./docker/Dockerfile_with_frontend_sentry
|
||||||
|
tags: felinae98/nonebot-bison:main-sentry
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download frontend files
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ matrix.file }}
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ matrix.tags }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
39
.github/workflows/release-drafter.yml
vendored
Normal file
39
.github/workflows/release-drafter.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Release Drafter
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-release-drafter:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency:
|
||||||
|
group: pull-request-changelog
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: release-drafter/release-drafter@v5
|
||||||
|
id: release-drafter
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Update Changelog
|
||||||
|
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
||||||
|
with:
|
||||||
|
latest_changes_position: '# Change Log\n\n'
|
||||||
|
latest_changes_title: '## 最近更新'
|
||||||
|
replace_regex: '(?<=## 最近更新\n)[\s\S]*?(?=\n## )'
|
||||||
|
changelog_body: ${{ steps.release-drafter.outputs.body }}
|
||||||
|
commit_and_push: false
|
||||||
|
|
||||||
|
- name: Commit and Push
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions[bot]
|
||||||
|
git config user.email github-actions[bot]@users.noreply.github.com
|
||||||
|
git add .
|
||||||
|
git diff-index --quiet HEAD || git commit -m ":memo: Update changelog"
|
||||||
|
git push
|
35
.github/workflows/release-trigger.yml
vendored
Normal file
35
.github/workflows/release-trigger.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Trigger Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
archive:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.GH_PAT }}
|
||||||
|
|
||||||
|
- name: Setup Python environment
|
||||||
|
uses: ./.github/actions/setup-python
|
||||||
|
|
||||||
|
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Archive Changelog
|
||||||
|
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
||||||
|
with:
|
||||||
|
archive_regex: '(?<=## )最近更新(?=\n)'
|
||||||
|
archive_title: ${{ env.TAG_NAME }}
|
||||||
|
commit_and_push: false
|
||||||
|
|
||||||
|
- name: Push Tag
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions[bot]
|
||||||
|
git config user.email github-actions[bot]@users.noreply.github.com
|
||||||
|
git add .
|
||||||
|
git commit -m ":bookmark: Release $(poetry version -s)"
|
||||||
|
git tag ${{ env.TAG_NAME }}
|
||||||
|
git push && git push --tags
|
128
.github/workflows/release.yml
vendored
Normal file
128
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-frontend:
|
||||||
|
name: Build Frontend
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
uses: ./.github/actions/build-frontend
|
||||||
|
|
||||||
|
- name: Upload dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./admin-frontend/build/
|
||||||
|
publish-pypi-github:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download frontend files
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
||||||
|
|
||||||
|
- name: Setup Python environment
|
||||||
|
uses: ./.github/actions/setup-python
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: release-drafter/release-drafter@v5
|
||||||
|
with:
|
||||||
|
name: Release ${{ env.TAG_NAME }}
|
||||||
|
tag: ${{ env.TAG_NAME }}
|
||||||
|
publish: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Publish PyPI and Github
|
||||||
|
run: |
|
||||||
|
poetry publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} || echo "Already pushed to pypi"
|
||||||
|
gh release upload --clobber ${{ env.TAG_NAME }} dist/*
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
publish-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download frontend files
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: frontend
|
||||||
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./docker/Dockerfile_with_frontend
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
felinae98/nonebot-bison:latest
|
||||||
|
felinae98/nonebot-bison:${{ env.TAG_NAME }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Build Sentry and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./docker/Dockerfile_with_frontend_sentry
|
||||||
|
push: true
|
||||||
|
tags: felinae98/nonebot-bison:${{ env.TAG_NAME }}-sentry
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
deploy-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
uses: ./.github/actions/build-docs
|
||||||
|
|
||||||
|
- name: Deploy to Netlify
|
||||||
|
uses: nwtgck/actions-netlify@v1
|
||||||
|
with:
|
||||||
|
publish-dir: "./docs/.vuepress/dist"
|
||||||
|
production-deploy: true
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
deploy-message: "Deploy ${{ env.TAG_NAME }}"
|
||||||
|
enable-commit-comment: false
|
||||||
|
alias: ${{ env.TAG_NAME }}
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
36
.github/workflows/website-preview.yml
vendored
Normal file
36
.github/workflows/website-preview.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Site Deploy(Preview)
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
preview:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency:
|
||||||
|
group: pull-request-preview-${{ github.event.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
uses: ./.github/actions/build-docs
|
||||||
|
|
||||||
|
- name: Get Deploy Name
|
||||||
|
run: |
|
||||||
|
echo "DEPLOY_NAME=deploy-preview-${{ github.event.number }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Deploy to Netlify
|
||||||
|
uses: nwtgck/actions-netlify@v1
|
||||||
|
with:
|
||||||
|
publish-dir: "./docs/.vuepress/dist"
|
||||||
|
production-deploy: false
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
deploy-message: "Deploy ${{ env.DEPLOY_NAME }}@${{ github.sha }}"
|
||||||
|
enable-commit-comment: false
|
||||||
|
alias: ${{ env.DEPLOY_NAME }}
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
@ -11,12 +11,12 @@ repos:
|
|||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.1.0
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v2.5.1
|
rev: v2.6.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
types_or: [markdown, ts, tsx]
|
types_or: [markdown, ts, tsx]
|
||||||
|
107
CHANGELOG.md
107
CHANGELOG.md
@ -1,47 +1,43 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## [0.2.11] - 2021-06-17
|
## 最近更新
|
||||||
|
|
||||||
- 增加了简单的单元测试
|
* No changes
|
||||||
- 增加了管理员直接管理订阅的能力
|
|
||||||
|
|
||||||
## [0.3.0] - 2021-07-06
|
## v0.5.3
|
||||||
|
|
||||||
- 微博 tag 支持
|
- on_command 设置 block=True (#63) @MeetWq
|
||||||
- 修复 bug
|
- 修复 issue#51 存在的问题并修改相应的单元测试 (#52) @AzideCupric
|
||||||
- 增加微博超话和纯文字支持
|
- 增添关于添加订阅命令中中止订阅的相关文档 (#45) @AzideCupric
|
||||||
- 更改浏览器配置
|
|
||||||
- 将“来源”移动到文末
|
|
||||||
- 使用组合来构建新的 platform,新增状态改变类型订阅
|
|
||||||
|
|
||||||
## [0.3.1] - 2021-07-10
|
### Bug 修复
|
||||||
|
|
||||||
- 修复不发送来源
|
- 修复#66 (#69) @felinae98
|
||||||
- 发送 RSS 订阅的 title
|
|
||||||
- 修复浏览器渲染问题
|
|
||||||
|
|
||||||
## [0.3.2] - 2021-09-28
|
## [0.5.2]
|
||||||
|
|
||||||
- 增加 NoTargetGroup
|
- 修复了微博获取全文时接口失效的问题
|
||||||
- 增加 1x3 拼图的支持
|
- 修复了 bilibili 空列表时的报错
|
||||||
- 增加网易云
|
|
||||||
|
|
||||||
## [0.3.3] - 2021-09-28
|
## [0.5.1]
|
||||||
|
|
||||||
- 修复拼图问题
|
- 使用了新的在私聊中进行群管理的方式:从`管理-*`替换为`群管理`命令
|
||||||
|
- 默认关闭自动重发功能
|
||||||
|
- 添加了 [推送消息合并转发功能](https://nonebot-bison.vercel.app/usage/#%E9%85%8D%E7%BD%AE)
|
||||||
|
- 添加了`添加订阅`命令事件的中途取消功能
|
||||||
|
- 优化了`添加订阅`命令的聊天处理逻辑
|
||||||
|
|
||||||
## [0.4.0] - 2021-11-18
|
## [0.5.0]
|
||||||
|
|
||||||
- 项目更名为 nonebot-bison
|
- 添加了 FF14
|
||||||
|
- 去掉了自己维护的 playwright,转向[nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)
|
||||||
|
- 支持了 nonebot 2.0.0beta
|
||||||
|
|
||||||
## [0.4.1] - 2021-11-31
|
## [0.4.4]
|
||||||
|
|
||||||
- 加入了管理后台
|
- 又双叒叕重构了一下
|
||||||
|
- 修复了 Docker 中 Playwright 下载的浏览器版本不正确问题
|
||||||
## [0.4.2]
|
- 加入了猴子补丁,使 Windows 里能运行 Playwright
|
||||||
|
|
||||||
并没有做什么只是为了修复前端文件没有正确打包的问题开了个新的版本号
|
|
||||||
推上 pypi
|
|
||||||
|
|
||||||
## [0.4.3]
|
## [0.4.3]
|
||||||
|
|
||||||
@ -52,22 +48,47 @@
|
|||||||
- 前端可以刷新了(之前居然不可以)
|
- 前端可以刷新了(之前居然不可以)
|
||||||
- 在镜像里塞进了浏览器(导致镜像体积起飞)
|
- 在镜像里塞进了浏览器(导致镜像体积起飞)
|
||||||
|
|
||||||
## [0.4.4]
|
## [0.4.2]
|
||||||
|
|
||||||
- 又双叒叕重构了一下
|
并没有做什么只是为了修复前端文件没有正确打包的问题开了个新的版本号
|
||||||
- 修复了 Docker 中 Playwright 下载的浏览器版本不正确问题
|
推上 pypi
|
||||||
- 加入了猴子补丁,使 Windows 里能运行 Playwright
|
|
||||||
|
|
||||||
## [0.5.0]
|
## [0.4.1] - 2021-11-31
|
||||||
|
|
||||||
- 添加了 FF14
|
- 加入了管理后台
|
||||||
- 去掉了自己维护的 playwright,转向[nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)
|
|
||||||
- 支持了 nonebot 2.0.0beta
|
|
||||||
|
|
||||||
## [0.5.1]
|
## [0.4.0] - 2021-11-18
|
||||||
|
|
||||||
- 使用了新的在私聊中进行群管理的方式:从`管理-*`替换为`群管理`命令
|
- 项目更名为 nonebot-bison
|
||||||
- 默认关闭自动重发功能
|
|
||||||
- 添加了 [推送消息合并转发功能](https://nonebot-bison.vercel.app/usage/#%E9%85%8D%E7%BD%AE)
|
## [0.3.3] - 2021-09-28
|
||||||
- 添加了`添加订阅`命令事件的中途取消功能
|
|
||||||
- 优化了`添加订阅`命令的聊天处理逻辑
|
- 修复了微博获取全文时接口失效的问题
|
||||||
|
- 修复了 bilibili 空列表时的报错
|
||||||
|
- 修复拼图问题
|
||||||
|
|
||||||
|
## [0.3.2] - 2021-09-28
|
||||||
|
|
||||||
|
- 增加 NoTargetGroup
|
||||||
|
- 增加 1x3 拼图的支持
|
||||||
|
- 增加网易云
|
||||||
|
|
||||||
|
## [0.3.1] - 2021-07-10
|
||||||
|
|
||||||
|
- 修复不发送来源
|
||||||
|
- 发送 RSS 订阅的 title
|
||||||
|
- 修复浏览器渲染问题
|
||||||
|
|
||||||
|
## [0.3.0] - 2021-07-06
|
||||||
|
|
||||||
|
- 微博 tag 支持
|
||||||
|
- 修复 bug
|
||||||
|
- 增加微博超话和纯文字支持
|
||||||
|
- 更改浏览器配置
|
||||||
|
- 将“来源”移动到文末
|
||||||
|
- 使用组合来构建新的 platform,新增状态改变类型订阅
|
||||||
|
|
||||||
|
## [0.2.11] - 2021-06-17
|
||||||
|
|
||||||
|
- 增加了简单的单元测试
|
||||||
|
- 增加了管理员直接管理订阅的能力
|
||||||
|
18
README.md
18
README.md
@ -28,15 +28,29 @@
|
|||||||
支持的平台:
|
支持的平台:
|
||||||
|
|
||||||
- 微博
|
- 微博
|
||||||
|
- 图文
|
||||||
|
- 视频
|
||||||
|
- 纯文字
|
||||||
|
- 转发
|
||||||
- Bilibili
|
- Bilibili
|
||||||
|
- 视频
|
||||||
|
- 图文
|
||||||
|
- 专栏
|
||||||
|
- 转发
|
||||||
|
- 纯文字
|
||||||
- RSS
|
- RSS
|
||||||
|
- 富文本转换为纯文本
|
||||||
|
- 提取出所有图片
|
||||||
- 明日方舟
|
- 明日方舟
|
||||||
- 塞壬唱片新闻
|
- 塞壬唱片新闻
|
||||||
- 游戏内公告
|
- 游戏内公告
|
||||||
- 版本更新等通知
|
- 版本更新等通知
|
||||||
|
- 泰拉记事社漫画
|
||||||
- 网易云音乐
|
- 网易云音乐
|
||||||
- 歌手发布新专辑
|
- 歌手发布新专辑
|
||||||
- 电台更新
|
- 电台更新
|
||||||
|
- FF14
|
||||||
|
- 游戏公告
|
||||||
|
|
||||||
## 功能
|
## 功能
|
||||||
|
|
||||||
@ -68,6 +82,10 @@ yarn && yarn build
|
|||||||
`COMMAND_START=["/"]`则应发送`/添加订阅`
|
`COMMAND_START=["/"]`则应发送`/添加订阅`
|
||||||
3. 微博漏订阅了
|
3. 微博漏订阅了
|
||||||
微博更新了新的风控措施,某些含有某些关键词的微博会获取不到。
|
微博更新了新的风控措施,某些含有某些关键词的微博会获取不到。
|
||||||
|
4. 无法使用后台管理页面
|
||||||
|
1. 确认自己正确配置了 nonebot 的端口,如果在远程或容器外访问网页请确保`HOST=0.0.0.0`
|
||||||
|
2. 确认自己的云服务器的防火墙配置正确
|
||||||
|
3. 确认自己使用了正确的方法安装插件
|
||||||
|
|
||||||
## 参与开发
|
## 参与开发
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-redux": "^7.2.6",
|
"react-redux": "^7.2.6",
|
||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
"react-scripts": "4.0.3",
|
"react-scripts": "^5.0.0",
|
||||||
"typescript": "^4.1.2",
|
"typescript": "^4.1.2",
|
||||||
"web-vitals": "^1.0.1"
|
"web-vitals": "^1.0.1"
|
||||||
},
|
},
|
||||||
|
13681
admin-frontend/yarn.lock
13681
admin-frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
@ -88,7 +88,7 @@ sidebar: auto
|
|||||||
1. 安装 pip 包`nonebot-bison`
|
1. 安装 pip 包`nonebot-bison`
|
||||||
2. 在`bot.py`中导入插件`nonebot_bison`
|
2. 在`bot.py`中导入插件`nonebot_bison`
|
||||||
|
|
||||||
### 自动安装
|
#### 使用 nb-cli 安装
|
||||||
|
|
||||||
使用`nb-cli`执行:`nb plugin install nonebot_bison`
|
使用`nb-cli`执行:`nb plugin install nonebot_bison`
|
||||||
|
|
||||||
@ -111,6 +111,9 @@ sidebar: auto
|
|||||||
默认`True`
|
默认`True`
|
||||||
- `BISON_OUTER_URL`: 从外部访问服务器的地址,默认为`http://localhost:8080/bison`,如果你的插件部署
|
- `BISON_OUTER_URL`: 从外部访问服务器的地址,默认为`http://localhost:8080/bison`,如果你的插件部署
|
||||||
在服务器上,建议配置为`http://<你的服务器ip>:8080/bison`
|
在服务器上,建议配置为`http://<你的服务器ip>:8080/bison`
|
||||||
|
::: warning
|
||||||
|
如果需要从外网或者 Docker 容器外访问后台页面,请确保`HOST=0.0.0.0`
|
||||||
|
:::
|
||||||
- `BISON_FILTER_LOG`: 是否过滤来自`nonebot`的 warning 级以下的 log,如果你的 bot 只运行了这个插件可以考虑
|
- `BISON_FILTER_LOG`: 是否过滤来自`nonebot`的 warning 级以下的 log,如果你的 bot 只运行了这个插件可以考虑
|
||||||
开启,默认关
|
开启,默认关
|
||||||
- `BISON_USE_QUEUE`: 是否用队列的方式发送消息,降低发送频率,默认开
|
- `BISON_USE_QUEUE`: 是否用队列的方式发送消息,降低发送频率,默认开
|
||||||
@ -149,14 +152,19 @@ sidebar: auto
|
|||||||
所有命令都需要@bot 触发
|
所有命令都需要@bot 触发
|
||||||
|
|
||||||
- 添加订阅(仅管理员和群主和 SUPERUSER):`添加订阅`
|
- 添加订阅(仅管理员和群主和 SUPERUSER):`添加订阅`
|
||||||
|
::: tip 关于中止订阅
|
||||||
|
对于[**v0.5.1**](https://github.com/felinae98/nonebot-bison/releases/tag/v0.5.1)及以上的版本中,已经为`添加订阅`命令添加了中止订阅的功能。
|
||||||
|
在添加订阅命令的~~几乎~~各个阶段,都可以向 Bot 发送`取消`消息来中止订阅过程(需要订阅发起者本人发送)
|
||||||
|
:::
|
||||||
- 查询订阅:`查询订阅`
|
- 查询订阅:`查询订阅`
|
||||||
- 删除订阅(仅管理员和群主和 SUPERUSER):`删除订阅`
|
- 删除订阅(仅管理员和群主和 SUPERUSER):`删除订阅`
|
||||||
|
|
||||||
#### 私聊机器人获取后台地址
|
#### 私聊机器人获取后台地址
|
||||||
|
|
||||||
`后台管理`,之后点击返回的链接
|
`后台管理`,之后点击返回的链接
|
||||||
如果你是 superuser,那么你可以管理所有群的订阅;如果你是 bot 所在的群的其中部分群的管理,
|
如果你是 superuser,那么你可以管理所有群的订阅;
|
||||||
你可以管理你管理的群里的订阅;如果你不是任意一个群的管理,那么 bot 将会报错。
|
如果你是 bot 所在的群的其中部分群的管理,你可以管理你管理的群里的订阅;
|
||||||
|
如果你不是任意一个群的管理,那么 bot 将会报错。
|
||||||
::: tip
|
::: tip
|
||||||
可以和 bot 通过临时聊天触发
|
可以和 bot 通过临时聊天触发
|
||||||
:::
|
:::
|
||||||
@ -167,9 +175,10 @@ sidebar: auto
|
|||||||
|
|
||||||
#### 私聊机器人进行配置(需要 SUPERUER 权限)
|
#### 私聊机器人进行配置(需要 SUPERUER 权限)
|
||||||
|
|
||||||
- 添加订阅:`管理-添加订阅`
|
请私聊 bot`群管理`
|
||||||
- 查询订阅:`管理-查询订阅`
|
::: tip 关于中止订阅
|
||||||
- 删除订阅:`管理-删除订阅`
|
与普通的[`添加订阅`](#在本群中进行配置)命令一样,在`群管理`命令中使用的`添加订阅`命令也可以使用`取消`来中止订阅过程
|
||||||
|
:::
|
||||||
|
|
||||||
### 所支持平台的 uid
|
### 所支持平台的 uid
|
||||||
|
|
||||||
|
823
poetry.lock
generated
823
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "nonebot-bison"
|
name = "nonebot-bison"
|
||||||
version = "0.5.0"
|
version = "0.5.3"
|
||||||
description = "Subscribe message from social medias"
|
description = "Subscribe message from social medias"
|
||||||
authors = ["felinae98 <felinae225@qq.com>"]
|
authors = ["felinae98 <felinae225@qq.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@ -25,11 +25,11 @@ classifiers = [
|
|||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.9"
|
||||||
nonebot2 = "^2.0.0-beta.2"
|
nonebot2 = "^2.0.0-beta.2"
|
||||||
httpx = ">=0.16.1 <1.0.0"
|
httpx = ">=0.16.1"
|
||||||
bs4 = "^0.0.1"
|
bs4 = "^0.0.1"
|
||||||
tinydb = "^4.3.0"
|
tinydb = "^4.3.0"
|
||||||
feedparser = "^6.0.2"
|
feedparser = "^6.0.2"
|
||||||
pillow = "^8.1.0"
|
pillow = ">=8.1,<10.0"
|
||||||
apscheduler = "^3.7.0"
|
apscheduler = "^3.7.0"
|
||||||
expiringdict = "^1.2.1"
|
expiringdict = "^1.2.1"
|
||||||
pyjwt = "^2.1.0"
|
pyjwt = "^2.1.0"
|
||||||
|
@ -129,8 +129,7 @@ def register_router_fastapi(driver: Driver, socketio):
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
driver = get_driver()
|
driver = get_driver()
|
||||||
if driver.type == "fastapi":
|
if isinstance(driver, Driver):
|
||||||
assert isinstance(driver, Driver)
|
|
||||||
register_router_fastapi(driver, socket_app)
|
register_router_fastapi(driver, socket_app)
|
||||||
else:
|
else:
|
||||||
logger.warning(f"Driver {driver.type} not supported")
|
logger.warning(f"Driver {driver.type} not supported")
|
||||||
|
@ -254,11 +254,16 @@ def do_del_sub(del_sub: Type[Matcher]):
|
|||||||
config: Config = Config()
|
config: Config = Config()
|
||||||
user_info = state["target_user_info"]
|
user_info = state["target_user_info"]
|
||||||
assert isinstance(user_info, User)
|
assert isinstance(user_info, User)
|
||||||
|
try:
|
||||||
sub_list = config.list_subscribe(
|
sub_list = config.list_subscribe(
|
||||||
# state.get("_user_id") or event.group_id, "group"
|
# state.get("_user_id") or event.group_id, "group"
|
||||||
user_info.user,
|
user_info.user,
|
||||||
user_info.user_type,
|
user_info.user_type,
|
||||||
)
|
)
|
||||||
|
assert sub_list
|
||||||
|
except AssertionError:
|
||||||
|
await del_sub.finish("暂无已订阅账号\n请使用“添加订阅”命令添加订阅")
|
||||||
|
else:
|
||||||
res = "订阅的帐号为:\n"
|
res = "订阅的帐号为:\n"
|
||||||
state["sub_table"] = {}
|
state["sub_table"] = {}
|
||||||
for index, sub in enumerate(sub_list, 1):
|
for index, sub in enumerate(sub_list, 1):
|
||||||
@ -279,13 +284,16 @@ def do_del_sub(del_sub: Type[Matcher]):
|
|||||||
if platform.enable_tag:
|
if platform.enable_tag:
|
||||||
res += " {}".format(", ".join(sub["tags"]))
|
res += " {}".format(", ".join(sub["tags"]))
|
||||||
res += "\n"
|
res += "\n"
|
||||||
res += "请输入要删除的订阅的序号"
|
res += "请输入要删除的订阅的序号\n输入'取消'中止"
|
||||||
await bot.send(event=event, message=Message(await parse_text(res)))
|
await bot.send(event=event, message=Message(await parse_text(res)))
|
||||||
|
|
||||||
@del_sub.receive()
|
@del_sub.receive()
|
||||||
async def do_del(event: Event, state: T_State):
|
async def do_del(event: Event, state: T_State):
|
||||||
|
user_msg = str(event.get_message()).strip()
|
||||||
|
if user_msg == "取消":
|
||||||
|
await del_sub.finish("删除中止")
|
||||||
try:
|
try:
|
||||||
index = int(str(event.get_message()).strip())
|
index = int(user_msg)
|
||||||
config = Config()
|
config = Config()
|
||||||
user_info = state["target_user_info"]
|
user_info = state["target_user_info"]
|
||||||
assert isinstance(user_info, User)
|
assert isinstance(user_info, User)
|
||||||
@ -307,12 +315,13 @@ add_sub_matcher = on_command(
|
|||||||
rule=configurable_to_me,
|
rule=configurable_to_me,
|
||||||
permission=GROUP_ADMIN | GROUP_OWNER | SUPERUSER,
|
permission=GROUP_ADMIN | GROUP_OWNER | SUPERUSER,
|
||||||
priority=5,
|
priority=5,
|
||||||
|
block=True,
|
||||||
)
|
)
|
||||||
add_sub_matcher.handle()(set_target_user_info)
|
add_sub_matcher.handle()(set_target_user_info)
|
||||||
do_add_sub(add_sub_matcher)
|
do_add_sub(add_sub_matcher)
|
||||||
|
|
||||||
|
|
||||||
query_sub_matcher = on_command("查询订阅", rule=configurable_to_me, priority=5)
|
query_sub_matcher = on_command("查询订阅", rule=configurable_to_me, priority=5, block=True)
|
||||||
query_sub_matcher.handle()(set_target_user_info)
|
query_sub_matcher.handle()(set_target_user_info)
|
||||||
do_query_sub(query_sub_matcher)
|
do_query_sub(query_sub_matcher)
|
||||||
|
|
||||||
@ -322,11 +331,14 @@ del_sub_matcher = on_command(
|
|||||||
rule=configurable_to_me,
|
rule=configurable_to_me,
|
||||||
permission=GROUP_ADMIN | GROUP_OWNER | SUPERUSER,
|
permission=GROUP_ADMIN | GROUP_OWNER | SUPERUSER,
|
||||||
priority=5,
|
priority=5,
|
||||||
|
block=True,
|
||||||
)
|
)
|
||||||
del_sub_matcher.handle()(set_target_user_info)
|
del_sub_matcher.handle()(set_target_user_info)
|
||||||
do_del_sub(del_sub_matcher)
|
do_del_sub(del_sub_matcher)
|
||||||
|
|
||||||
group_manage_matcher = on_command("群管理", rule=to_me(), permission=SUPERUSER, priority=4)
|
group_manage_matcher = on_command(
|
||||||
|
"群管理", rule=to_me(), permission=SUPERUSER, priority=4, block=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@group_manage_matcher.handle()
|
@group_manage_matcher.handle()
|
||||||
|
@ -189,3 +189,47 @@ class MonsterSiren(NewMessage):
|
|||||||
compress=True,
|
compress=True,
|
||||||
override_use_pic=False,
|
override_use_pic=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TerraHistoricusComic(NewMessage):
|
||||||
|
|
||||||
|
categories = {4: "泰拉记事社漫画"}
|
||||||
|
platform_name = "arknights"
|
||||||
|
name = "明日方舟游戏信息"
|
||||||
|
enable_tag = False
|
||||||
|
enabled = True
|
||||||
|
is_common = False
|
||||||
|
schedule_type = "interval"
|
||||||
|
schedule_kw = {"seconds": 30}
|
||||||
|
has_target = False
|
||||||
|
|
||||||
|
async def get_target_name(self, _: Target) -> str:
|
||||||
|
return "明日方舟游戏信息"
|
||||||
|
|
||||||
|
async def get_sub_list(self, _) -> list[RawPost]:
|
||||||
|
async with httpx.AsyncClient() as client:
|
||||||
|
raw_data = await client.get(
|
||||||
|
"https://terra-historicus.hypergryph.com/api/recentUpdate"
|
||||||
|
)
|
||||||
|
return raw_data.json()["data"]
|
||||||
|
|
||||||
|
def get_id(self, post: RawPost) -> Any:
|
||||||
|
return f'{post["comicCid"]}/{post["episodeCid"]}'
|
||||||
|
|
||||||
|
def get_date(self, _) -> None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get_category(self, _) -> Category:
|
||||||
|
return Category(4)
|
||||||
|
|
||||||
|
async def parse(self, raw_post: RawPost) -> Post:
|
||||||
|
url = f'https://terra-historicus.hypergryph.com/comic/{raw_post["comicCid"]}/episode/{raw_post["episodeCid"]}'
|
||||||
|
return Post(
|
||||||
|
"terra-historicus",
|
||||||
|
text=f'{raw_post["title"]} - {raw_post["episodeShortTitle"]}',
|
||||||
|
pics=[raw_post["coverUrl"]],
|
||||||
|
url=url,
|
||||||
|
target_name="泰拉记事社漫画",
|
||||||
|
compress=True,
|
||||||
|
override_use_pic=False,
|
||||||
|
)
|
||||||
|
@ -59,7 +59,7 @@ class Bilibili(NewMessage):
|
|||||||
)
|
)
|
||||||
res_dict = json.loads(res.text)
|
res_dict = json.loads(res.text)
|
||||||
if res_dict["code"] == 0:
|
if res_dict["code"] == 0:
|
||||||
return res_dict["data"]["cards"]
|
return res_dict["data"].get("cards")
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
@ -133,13 +133,17 @@ class Weibo(NewMessage):
|
|||||||
"Mobile Safari/537.36",
|
"Mobile Safari/537.36",
|
||||||
}
|
}
|
||||||
info = raw_post["mblog"]
|
info = raw_post["mblog"]
|
||||||
if info["isLongText"] or info["pic_num"] > 9:
|
retweeted = False
|
||||||
|
if info.get("retweeted_status"):
|
||||||
|
retweeted = True
|
||||||
|
pic_num = info["retweeted_status"]["pic_num"] if retweeted else info["pic_num"]
|
||||||
|
if info["isLongText"] or pic_num > 9:
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
res = await client.get(
|
res = await client.get(
|
||||||
"https://m.weibo.cn/detail/{}".format(info["mid"]), headers=header
|
"https://m.weibo.cn/detail/{}".format(info["mid"]), headers=header
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
match = re.search(r'"status": ([\s\S]+),\s+"hotScheme"', res.text)
|
match = re.search(r'"status": ([\s\S]+),\s+"call"', res.text)
|
||||||
assert match
|
assert match
|
||||||
full_json_text = match.group(1)
|
full_json_text = match.group(1)
|
||||||
info = json.loads(full_json_text)
|
info = json.loads(full_json_text)
|
||||||
@ -150,7 +154,12 @@ class Weibo(NewMessage):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
parsed_text = self._get_text(info["text"])
|
parsed_text = self._get_text(info["text"])
|
||||||
pic_urls = [img["large"]["url"] for img in info.get("pics", [])]
|
raw_pics_list = (
|
||||||
|
info["retweeted_status"].get("pics", [])
|
||||||
|
if retweeted
|
||||||
|
else info.get("pics", [])
|
||||||
|
)
|
||||||
|
pic_urls = [img["large"]["url"] for img in raw_pics_list]
|
||||||
detail_url = "https://weibo.com/{}/{}".format(info["user"]["id"], info["bid"])
|
detail_url = "https://weibo.com/{}/{}".format(info["user"]["id"], info["bid"])
|
||||||
# return parsed_text, detail_url, pic_urls
|
# return parsed_text, detail_url, pic_urls
|
||||||
return Post(
|
return Post(
|
||||||
|
@ -24,7 +24,7 @@ class Post:
|
|||||||
pics: list[Union[str, bytes]] = field(default_factory=list)
|
pics: list[Union[str, bytes]] = field(default_factory=list)
|
||||||
extra_msg: list[Message] = field(default_factory=list)
|
extra_msg: list[Message] = field(default_factory=list)
|
||||||
|
|
||||||
_message: Optional[list] = None
|
_message: Optional[list[Message]] = None
|
||||||
|
|
||||||
def _use_pic(self):
|
def _use_pic(self):
|
||||||
if not self.override_use_pic is None:
|
if not self.override_use_pic is None:
|
||||||
@ -107,10 +107,10 @@ class Post:
|
|||||||
self.pics = self.pics[matrix[0] * matrix[1] :]
|
self.pics = self.pics[matrix[0] * matrix[1] :]
|
||||||
self.pics.insert(0, target_io.getvalue())
|
self.pics.insert(0, target_io.getvalue())
|
||||||
|
|
||||||
async def generate_messages(self):
|
async def generate_messages(self) -> list[Message]:
|
||||||
if self._message is None:
|
if self._message is None:
|
||||||
await self._pic_merge()
|
await self._pic_merge()
|
||||||
msgs = []
|
msg_segments: list[MessageSegment] = []
|
||||||
text = ""
|
text = ""
|
||||||
if self.text:
|
if self.text:
|
||||||
if self._use_pic():
|
if self._use_pic():
|
||||||
@ -123,20 +123,21 @@ class Post:
|
|||||||
if self.target_name:
|
if self.target_name:
|
||||||
text += " {}".format(self.target_name)
|
text += " {}".format(self.target_name)
|
||||||
if self._use_pic():
|
if self._use_pic():
|
||||||
msgs.append(await parse_text(text))
|
msg_segments.append(await parse_text(text))
|
||||||
if not self.target_type == "rss" and self.url:
|
if not self.target_type == "rss" and self.url:
|
||||||
msgs.append(MessageSegment.text(self.url))
|
msg_segments.append(MessageSegment.text(self.url))
|
||||||
else:
|
else:
|
||||||
if self.url:
|
if self.url:
|
||||||
text += " \n详情: {}".format(self.url)
|
text += " \n详情: {}".format(self.url)
|
||||||
msgs.append(MessageSegment.text(text))
|
msg_segments.append(MessageSegment.text(text))
|
||||||
for pic in self.pics:
|
for pic in self.pics:
|
||||||
# if isinstance(pic, bytes):
|
msg_segments.append(MessageSegment.image(pic))
|
||||||
# pic = 'base64://' + base64.b64encode(pic).decode()
|
|
||||||
# msgs.append(Message("[CQ:image,file={url}]".format(url=pic)))
|
|
||||||
msgs.append(MessageSegment.image(pic))
|
|
||||||
if self.compress:
|
if self.compress:
|
||||||
msgs = [reduce(lambda x, y: x.append(y), msgs, Message())]
|
msgs = [reduce(lambda x, y: x.append(y), msg_segments, Message())]
|
||||||
|
else:
|
||||||
|
msgs = list(
|
||||||
|
map(lambda msg_segment: Message([msg_segment]), msg_segments)
|
||||||
|
)
|
||||||
msgs.extend(self.extra_msg)
|
msgs.extend(self.extra_msg)
|
||||||
self._message = msgs
|
self._message = msgs
|
||||||
assert len(self._message) > 0, f"message list empty, {self}"
|
assert len(self._message) > 0, f"message list empty, {self}"
|
||||||
|
@ -17,6 +17,18 @@ scheduler = AsyncIOScheduler(timezone="Asia/Shanghai")
|
|||||||
|
|
||||||
@get_driver().on_startup
|
@get_driver().on_startup
|
||||||
async def _start():
|
async def _start():
|
||||||
|
for platform_name, platform in platform_manager.items():
|
||||||
|
if platform.schedule_type in ["cron", "interval", "date"]:
|
||||||
|
logger.info(
|
||||||
|
f"start scheduler for {platform_name} with {platform.schedule_type} {platform.schedule_kw}"
|
||||||
|
)
|
||||||
|
scheduler.add_job(
|
||||||
|
fetch_and_send,
|
||||||
|
platform.schedule_type,
|
||||||
|
**platform.schedule_kw,
|
||||||
|
args=(platform_name,),
|
||||||
|
)
|
||||||
|
|
||||||
scheduler.configure({"apscheduler.timezone": "Asia/Shanghai"})
|
scheduler.configure({"apscheduler.timezone": "Asia/Shanghai"})
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
@ -65,19 +77,6 @@ async def fetch_and_send(target_type: str):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
for platform_name, platform in platform_manager.items():
|
|
||||||
if platform.schedule_type in ["cron", "interval", "date"]:
|
|
||||||
logger.info(
|
|
||||||
f"start scheduler for {platform_name} with {platform.schedule_type} {platform.schedule_kw}"
|
|
||||||
)
|
|
||||||
scheduler.add_job(
|
|
||||||
fetch_and_send,
|
|
||||||
platform.schedule_type,
|
|
||||||
**platform.schedule_kw,
|
|
||||||
args=(platform_name,),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class CustomLogHandler(LoguruHandler):
|
class CustomLogHandler(LoguruHandler):
|
||||||
def filter(self, record: logging.LogRecord):
|
def filter(self, record: logging.LogRecord):
|
||||||
return record.msg != (
|
return record.msg != (
|
||||||
|
@ -64,11 +64,14 @@ async def _send_msgs_dispatch(
|
|||||||
await _do_send(bot, user, user_type, msg)
|
await _do_send(bot, user, user_type, msg)
|
||||||
|
|
||||||
|
|
||||||
async def send_msgs(bot: Bot, user, user_type: Literal["private", "group"], msgs: list):
|
async def send_msgs(
|
||||||
|
bot: Bot, user, user_type: Literal["private", "group"], msgs: list[Message]
|
||||||
|
):
|
||||||
if not plugin_config.bison_use_pic_merge or user_type == "private":
|
if not plugin_config.bison_use_pic_merge or user_type == "private":
|
||||||
for msg in msgs:
|
for msg in msgs:
|
||||||
await _send_msgs_dispatch(bot, user, user_type, msg)
|
await _send_msgs_dispatch(bot, user, user_type, msg)
|
||||||
return
|
return
|
||||||
|
msgs = msgs.copy()
|
||||||
if plugin_config.bison_use_pic_merge == 1:
|
if plugin_config.bison_use_pic_merge == 1:
|
||||||
await _send_msgs_dispatch(bot, user, "group", msgs.pop(0))
|
await _send_msgs_dispatch(bot, user, "group", msgs.pop(0))
|
||||||
if msgs:
|
if msgs:
|
||||||
@ -78,14 +81,28 @@ async def send_msgs(bot: Bot, user, user_type: Literal["private", "group"], msgs
|
|||||||
group_bot_info = await bot.get_group_member_info(
|
group_bot_info = await bot.get_group_member_info(
|
||||||
group_id=user, user_id=int(bot.self_id), no_cache=True
|
group_id=user, user_id=int(bot.self_id), no_cache=True
|
||||||
) # 调用api获取群内bot的相关参数
|
) # 调用api获取群内bot的相关参数
|
||||||
forward_msg = Message(
|
# forward_msg = Message(
|
||||||
[
|
# [
|
||||||
MessageSegment.node_custom(
|
# MessageSegment.node_custom(
|
||||||
group_bot_info["user_id"],
|
# group_bot_info["user_id"],
|
||||||
nickname=group_bot_info["card"] or group_bot_info["nickname"],
|
# nickname=group_bot_info["card"] or group_bot_info["nickname"],
|
||||||
content=msg,
|
# content=msg,
|
||||||
)
|
# )
|
||||||
|
# for msg in msgs
|
||||||
|
# ]
|
||||||
|
# )
|
||||||
|
# FIXME: Because of https://github.com/nonebot/adapter-onebot/issues/9
|
||||||
|
|
||||||
|
forward_msg = [
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"data": {
|
||||||
|
"name": group_bot_info["card"] or group_bot_info["nickname"],
|
||||||
|
"uin": group_bot_info["user_id"],
|
||||||
|
"content": msg,
|
||||||
|
},
|
||||||
|
}
|
||||||
for msg in msgs
|
for msg in msgs
|
||||||
]
|
]
|
||||||
)
|
|
||||||
await _send_msgs_dispatch(bot, user, "group-forward", forward_msg)
|
await _send_msgs_dispatch(bot, user, "group-forward", forward_msg)
|
||||||
|
24
tests/platforms/static/arknights-detail-807
Normal file
24
tests/platforms/static/arknights-detail-807
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
||||||
|
<meta name="keywords" content="明日方舟,明日方舟官网,明日方舟手游,二次元,明日方舟Arknights,魔物娘,战棋,策略,塔防,塔防RPG,Arknights,人外,Monster" />
|
||||||
|
<meta name="description" content="《明日方舟》是一款魔物主题的策略手游。在游戏中,玩家将管理一艘满载“ 魔物干员”的方舟,为调查来源神秘的矿石灾难而踏上旅途。在这个宽广而危机四伏的世界中,你或许会看到废土中的城市废墟,或许会看到仿若幻境的亚人国度,或许会遭遇无法解读的神秘,或许参与无比残酷的战争。在有关幻想与异种生命的世界中,体验史诗与想象,情感与牵绊!" />
|
||||||
|
<link rel="icon" href="data:;base64,=" />
|
||||||
|
<title>公告</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/css/announcement.v_0_1_2.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="banner-image-container cover">
|
||||||
|
<a class="cover-jumper" href="uniwebview://move?target=recruit&param1=NORM_24_0_1">
|
||||||
|
<img class="banner-image" src="https://ak.hycdn.cn/announce/images/20211209/ff886833a69b48e513ff911f64f6d881.JPG" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
91
tests/platforms/static/arknights_list_-1.json
Normal file
91
tests/platforms/static/arknights_list_-1.json
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"focusAnnounceId": "816",
|
||||||
|
"announceList": [
|
||||||
|
{
|
||||||
|
"announceId": "809",
|
||||||
|
"title": "冰原信使系列\n新装限时上架",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/809_1640060505.html",
|
||||||
|
"day": 21,
|
||||||
|
"month": 12,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "810",
|
||||||
|
"title": "寒武纪系列\n限时复刻上架",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/810_1640060511.html",
|
||||||
|
"day": 21,
|
||||||
|
"month": 12,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "806",
|
||||||
|
"title": "跨年欢庆·回首\n限时寻访说明",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/806_1639379808.html",
|
||||||
|
"day": 14,
|
||||||
|
"month": 12,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "802",
|
||||||
|
"title": "「制作组通讯」\n#15期",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/802_1638871766.html",
|
||||||
|
"day": 8,
|
||||||
|
"month": 12,
|
||||||
|
"group": "SYSTEM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "97",
|
||||||
|
"title": "新人寻访特惠\n必得六星干员",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/97_1606379786.html",
|
||||||
|
"day": 30,
|
||||||
|
"month": 4,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "95",
|
||||||
|
"title": "通关特定关卡\n赠送专属时装",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/95_1606379781.html",
|
||||||
|
"day": 30,
|
||||||
|
"month": 4,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "192",
|
||||||
|
"title": "《明日方舟》\n公测开启说明",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/192_1606379744.html",
|
||||||
|
"day": 30,
|
||||||
|
"month": 4,
|
||||||
|
"group": "SYSTEM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "98",
|
||||||
|
"title": "《明日方舟》\n公平运营申明",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/98_1638970453.html",
|
||||||
|
"day": 30,
|
||||||
|
"month": 4,
|
||||||
|
"group": "SYSTEM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"announceId": "94",
|
||||||
|
"title": "常驻活动介绍",
|
||||||
|
"isWebUrl": true,
|
||||||
|
"webUrl": "https://ak.hycdn.cn/announce/IOS/announcement/94_1606379757.html",
|
||||||
|
"day": 30,
|
||||||
|
"month": 4,
|
||||||
|
"group": "ACTIVITY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extra": {
|
||||||
|
"enable": false,
|
||||||
|
"name": "额外活动"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
1
tests/platforms/static/terra-hist-0.json
Normal file
1
tests/platforms/static/terra-hist-0.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"code":0,"msg":"","data":[{"coverUrl":"https://web.hycdn.cn/comic/pic/20220507/c4da4fb95587101f1867a30fe85cb557.png","comicCid":"6253","title":"123罗德岛!?","subtitle":"你可能不知道的罗德岛小剧场!","episodeCid":"5771","episodeType":1,"episodeShortTitle":"「流明」篇","updateTime":1652025600},{"coverUrl":"https://web.hycdn.cn/comic/pic/20220505/5c296539f5dc808603f20dda86879c9c.png","comicCid":"0696","title":"A1行动预备组","subtitle":"","episodeCid":"2897","episodeType":1,"episodeShortTitle":"01","updateTime":1651852800},{"coverUrl":"https://web.hycdn.cn/comic/pic/20220428/f4dc1e91420d18eccb80d60bba322d42.png","comicCid":"6253","title":"123罗德岛!?","subtitle":"你可能不知道的罗德岛小剧场!","episodeCid":"6346","episodeType":1,"episodeShortTitle":"「艾丽妮」篇","updateTime":1651507200}]}
|
1
tests/platforms/static/terra-hist-1.json
Normal file
1
tests/platforms/static/terra-hist-1.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"code":0,"msg":"","data":[{"coverUrl":"https://web.hycdn.cn/comic/pic/20220507/ab8a2ff408ec7d587775aed70b178ec0.png","comicCid":"6253","title":"123罗德岛!?","subtitle":"你可能不知道的罗德岛小剧场!","episodeCid":"4938","episodeType":1,"episodeShortTitle":"「掠风」篇","updateTime":1652112000},{"coverUrl":"https://web.hycdn.cn/comic/pic/20220507/c4da4fb95587101f1867a30fe85cb557.png","comicCid":"6253","title":"123罗德岛!?","subtitle":"你可能不知道的罗德岛小剧场!","episodeCid":"5771","episodeType":1,"episodeShortTitle":"「流明」篇","updateTime":1652025600},{"coverUrl":"https://web.hycdn.cn/comic/pic/20220505/5c296539f5dc808603f20dda86879c9c.png","comicCid":"0696","title":"A1行动预备组","subtitle":"","episodeCid":"2897","episodeType":1,"episodeShortTitle":"01","updateTime":1651852800},{"coverUrl":"https://web.hycdn.cn/comic/pic/20220428/f4dc1e91420d18eccb80d60bba322d42.png","comicCid":"6253","title":"123罗德岛!?","subtitle":"你可能不知道的罗德岛小剧场!","episodeCid":"6346","episodeType":1,"episodeShortTitle":"「艾丽妮」篇","updateTime":1651507200}]}
|
@ -15,7 +15,7 @@
|
|||||||
<style>html, body {margin: 0 !important;padding: 0 !important;}html, body, #app {height: 100%;}[v-cloak] {display: none;}.wb-item-wrap .card9.card{margin:0}.f-weibo .m-img-box{background-color:#e6e6e6}.empty-bg{width:100%;background-color:#e6e6e6;height:.375rem}.inline-block{display:inline-block}.txt-margin{margin:0 0 1rem 0}.width-min{width:4.375rem}.anim-load{animation:load .5s ease-out;-moz-animation:load .5s ease-out;-webkit-animation:load .5s ease-out;-o-animation:load .5s ease-out}@keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-moz-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-webkit-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}.f-more{letter-spacing:.1rem}.f-weibo .f-card-title{margin:-1rem -1rem .5rem -1rem;padding:0 1rem;border-width:0}.f-weibo .m-avatar-box .m-img-box .m-icon{font-size:14px}.iosx3 .card9 .f-card-title{border-width:0}.iosx2 .card9 .f-card-title{border-width:0}.f-weibo.card9{border-bottom:1px solid #e6e6e6}.iosx3 .f-weibo.card9{border-bottom:.36px solid #e6e6e6}.iosx2 .f-weibo.card9{border-bottom:.5px solid #e6e6e6}.f-weibo.card9>.card-wrap{margin-left:.75rem;margin-right:.75rem}.f-weibo.card9.m-panel{border-top-width:0}.f-weibo.card .card-wrap .f-col-wrap{padding:0 .9375rem}.f-weibo.card9 .m-box-col{min-width:0}.f-weibo.card9 .weibo-top{padding:0 0 0 .25rem}.f-weibo.card9 .weibo-top .m-box-col .m-icon{margin-left:3px}.f-weibo.card9 .weibo-main .weibo-og{padding:.75rem 0 0 .25rem}.f-weibo.card9 .weibo-main .card-wrap ~ .weibo-rp{margin-top:0.5rem}.f-weibo.card9 .weibo-main .media-b{margin:.625rem 0 -.375rem}.f-weibo.card9 .weibo-main .media-b .m-auto-list{margin:0 0 -.25rem}.f-weibo .weibo-top .m-text-box{margin:.15rem 0 .15rem .5rem}.f-weibo .f-r{float:right}.f-weibo .weibo-main .weibo-og{font-size:.9375rem}.f-weibo .weibo-rp .weibo-text{font-size:.9375rem}.f-weibo .weibo-rp .f-footer-ctrl{padding:0.625rem 0 0}.f-weibo .f-bg-img{background-size:cover;background-repeat:no-repeat;background-position:center;position:absolute;width:100%;height:100%}.f-footer-ctrl{border-top-width:0;height:1.1rem;padding: 1rem .375rem 1rem 0;margin: 0 0.75rem}.f-footer-ctrl .m-diy-btn{color:rgba(40,47,60,0.8);height:100%;float:left}.f-footer-ctrl .m-diy-btn+.m-diy-btn{margin-left:1.6875rem}.f-footer-ctrl .m-diy-btn .m-icon{font-size:16px}.f-footer-ctrl aside{float:right;color:rgba(40,47,60,0.8)}.f-footer-ctrl .m-font{font-size:1rem;vertical-align:middle}.f-footer-ctrl .m-diy-btn h4{font-size:.8125rem;display:inline-block;margin-top:0;margin-left:.25rem}.dbfalls a {color: #333;}.dbfalls .m-icon-like {filter: contrast(0);}</style>
|
<style>html, body {margin: 0 !important;padding: 0 !important;}html, body, #app {height: 100%;}[v-cloak] {display: none;}.wb-item-wrap .card9.card{margin:0}.f-weibo .m-img-box{background-color:#e6e6e6}.empty-bg{width:100%;background-color:#e6e6e6;height:.375rem}.inline-block{display:inline-block}.txt-margin{margin:0 0 1rem 0}.width-min{width:4.375rem}.anim-load{animation:load .5s ease-out;-moz-animation:load .5s ease-out;-webkit-animation:load .5s ease-out;-o-animation:load .5s ease-out}@keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-moz-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-webkit-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}.f-more{letter-spacing:.1rem}.f-weibo .f-card-title{margin:-1rem -1rem .5rem -1rem;padding:0 1rem;border-width:0}.f-weibo .m-avatar-box .m-img-box .m-icon{font-size:14px}.iosx3 .card9 .f-card-title{border-width:0}.iosx2 .card9 .f-card-title{border-width:0}.f-weibo.card9{border-bottom:1px solid #e6e6e6}.iosx3 .f-weibo.card9{border-bottom:.36px solid #e6e6e6}.iosx2 .f-weibo.card9{border-bottom:.5px solid #e6e6e6}.f-weibo.card9>.card-wrap{margin-left:.75rem;margin-right:.75rem}.f-weibo.card9.m-panel{border-top-width:0}.f-weibo.card .card-wrap .f-col-wrap{padding:0 .9375rem}.f-weibo.card9 .m-box-col{min-width:0}.f-weibo.card9 .weibo-top{padding:0 0 0 .25rem}.f-weibo.card9 .weibo-top .m-box-col .m-icon{margin-left:3px}.f-weibo.card9 .weibo-main .weibo-og{padding:.75rem 0 0 .25rem}.f-weibo.card9 .weibo-main .card-wrap ~ .weibo-rp{margin-top:0.5rem}.f-weibo.card9 .weibo-main .media-b{margin:.625rem 0 -.375rem}.f-weibo.card9 .weibo-main .media-b .m-auto-list{margin:0 0 -.25rem}.f-weibo .weibo-top .m-text-box{margin:.15rem 0 .15rem .5rem}.f-weibo .f-r{float:right}.f-weibo .weibo-main .weibo-og{font-size:.9375rem}.f-weibo .weibo-rp .weibo-text{font-size:.9375rem}.f-weibo .weibo-rp .f-footer-ctrl{padding:0.625rem 0 0}.f-weibo .f-bg-img{background-size:cover;background-repeat:no-repeat;background-position:center;position:absolute;width:100%;height:100%}.f-footer-ctrl{border-top-width:0;height:1.1rem;padding: 1rem .375rem 1rem 0;margin: 0 0.75rem}.f-footer-ctrl .m-diy-btn{color:rgba(40,47,60,0.8);height:100%;float:left}.f-footer-ctrl .m-diy-btn+.m-diy-btn{margin-left:1.6875rem}.f-footer-ctrl .m-diy-btn .m-icon{font-size:16px}.f-footer-ctrl aside{float:right;color:rgba(40,47,60,0.8)}.f-footer-ctrl .m-font{font-size:1rem;vertical-align:middle}.f-footer-ctrl .m-diy-btn h4{font-size:.8125rem;display:inline-block;margin-top:0;margin-left:.25rem}.dbfalls a {color: #333;}.dbfalls .m-icon-like {filter: contrast(0);}</style>
|
||||||
<style>
|
<style>
|
||||||
</style>
|
</style>
|
||||||
<link href="//h5.sinaimg.cn/m/weibo-lite/css/app.952c2508.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.d90db39c.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/js/app.fd9603ad.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/manifest.5ecace0f.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/vendor.36b3e5f0.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.d90db39c.css" rel="stylesheet"><link href="//h5.sinaimg.cn/m/weibo-lite/css/app.952c2508.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="//h5.sinaimg.cn/m/weibo-lite/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="//h5.sinaimg.cn/m/weibo-lite/favicon-16.png"><link rel="manifest" href="//h5.sinaimg.cn/m/weibo-lite/manifest.json"><meta name="theme-color" content="#F3F3F3"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="微博Lite"><link rel="apple-touch-icon" href="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><link rel="mask-icon" href="//h5.sinaimg.cn/m/weibo-lite/mask-icon.svg" color="#F3F3F3"><meta name="msapplication-TileImage" content="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><meta name="msapplication-TileColor" content="#000000"></head>
|
<link href="//h5.sinaimg.cn/m/weibo-lite/css/app.2b65fef8.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.ed418b16.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/js/app.11a3fee7.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/manifest.bb6ddc12.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/vendor.14bfc30c.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.ed418b16.css" rel="stylesheet"><link href="//h5.sinaimg.cn/m/weibo-lite/css/app.2b65fef8.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="//h5.sinaimg.cn/m/weibo-lite/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="//h5.sinaimg.cn/m/weibo-lite/favicon-16.png"><link rel="manifest" href="//h5.sinaimg.cn/m/weibo-lite/manifest.json"><meta name="theme-color" content="#F3F3F3"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="微博Lite"><link rel="apple-touch-icon" href="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><meta name="msapplication-TileColor" content="#000000"></head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app" class="m-container-max">
|
<div id="app" class="m-container-max">
|
||||||
@ -30,15 +30,23 @@
|
|||||||
<script>
|
<script>
|
||||||
var config = {
|
var config = {
|
||||||
env: 'prod',
|
env: 'prod',
|
||||||
version: 'v2.9.9',
|
version: 'v2.10.4',
|
||||||
login: [][0],
|
login: [][0],
|
||||||
st: '581567',
|
st: '0e7c66',
|
||||||
uid: '',
|
uid: '',
|
||||||
pageConfig: [null][0] || {},
|
pageConfig: [null][0] || {},
|
||||||
preferQuickapp: '0',
|
preferQuickapp: '0',
|
||||||
wm: ''
|
wm: ''
|
||||||
}
|
}
|
||||||
var $render_data = [{
|
var $render_data = [{
|
||||||
|
"hotScheme": "https://m.weibo.cn/p/index?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&luicode=20000061&lfid=4645748019299849",
|
||||||
|
"appScheme": "https://m.weibo.cn?luicode=20000061&lfid=4645748019299849",
|
||||||
|
"callUinversalLink": false,
|
||||||
|
"callWeibo": false,
|
||||||
|
"schemeOrigin": false,
|
||||||
|
"appLink": "sinaweibo://detail?mblogid=4645748019299849&luicode=20000061&lfid=4645748019299849",
|
||||||
|
"xianzhi_scheme": "xianzhi://mblogshow?mid=4645748019299849",
|
||||||
|
"third_scheme": "sinaweibo://detail?mblogid=4645748019299849&luicode=20000061&lfid=4645748019299849",
|
||||||
"status": {
|
"status": {
|
||||||
"visible": {
|
"visible": {
|
||||||
"type": 0,
|
"type": 0,
|
||||||
@ -50,22 +58,20 @@
|
|||||||
"edit_count": 2,
|
"edit_count": 2,
|
||||||
"can_edit": false,
|
"can_edit": false,
|
||||||
"edit_at": "Wed Jun 16 10:51:10 +0800 2021",
|
"edit_at": "Wed Jun 16 10:51:10 +0800 2021",
|
||||||
"version": 6,
|
|
||||||
"show_additional_indication": 0,
|
"show_additional_indication": 0,
|
||||||
"text": "<a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&isnewpage=1&luicode=20000061&lfid=4645748019299849\" data-hide=\"\"><span class=\"surl-text\">#明日方舟#</span></a> <a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E9%9F%B3%E5%BE%8B%E8%81%94%E8%A7%89%23&extparam=%23%E9%9F%B3%E5%BE%8B%E8%81%94%E8%A7%89%23&luicode=20000061&lfid=4645748019299849\" data-hide=\"\"><span class=\"surl-text\">#音律联觉#</span></a><br />2021明日方舟音律联觉Ambience Synesthesia专场演出官方录播将于6月12日10:30正式上线,本次录播为大会员专享,相关信息可关注 <a data-url=\"http://t.cn/A6VRxRhv\" href=\"http://t.cn/A6VRxRhv\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_web_default.png'></span><span class=\"surl-text\">网页链接</span></a><br /><br />一、音律联觉原声EP将于2021年6月12日正式上架塞壬唱片官网及网易云音乐,敬请期待。<br />【歌曲列表】<br />1. CanNot Wait For<br />2. ManiFesto:<br />3. 灯华梦踏<br />4. 前航远歌<br /><br />二、【明日方舟·音律联觉】BILIBILI个性装扮套装即将上线,相关信息可关注明日方舟BILIBILI官方账号。<br /><br />三、明日方舟音律联觉主题黑胶礼盒现已上架,详情可关注“明日方舟朝陇山”。<br /><br />关注并转发本条微博,我们将通过<a href='/n/微博抽奖平台'>@微博抽奖平台</a> 抽取十位博士送出【音律联觉主题黑胶礼盒各一套】,将于6月12日开奖。<br />开奖后奖品会在出货后寄出。 <a data-url=\"http://t.cn/A6VR9W6h\" href=\"https://video.weibo.com/show?fid=1034:4645779462357001\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_video_default.png'></span><span class=\"surl-text\">明日方舟Arknights的微博视频</span></a> <a data-url=\"http://t.cn/A6Vk6ARb\" href=\"http://t.cn/A6Vk6ARb\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_web_default.png'></span><span class=\"surl-text\">抽奖详情</span></a>",
|
"text": "<a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&extparam=%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&luicode=20000061&lfid=4645748019299849\" data-hide=\"\"><span class=\"surl-text\">#明日方舟#</span></a> <a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E9%9F%B3%E5%BE%8B%E8%81%94%E8%A7%89%23&extparam=%23%E9%9F%B3%E5%BE%8B%E8%81%94%E8%A7%89%23&luicode=20000061&lfid=4645748019299849\" data-hide=\"\"><span class=\"surl-text\">#音律联觉#</span></a><br />2021明日方舟音律联觉Ambience Synesthesia专场演出官方录播将于6月12日10:30正式上线,本次录播为大会员专享,相关信息可关注 <a href=\"https://weibo.cn/sinaurl?u=http%3A%2F%2Fmrfz.biligame.com%2Fyllj%2F\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_web_default.png'></span><span class=\"surl-text\">网页链接</span></a><br /><br />一、音律联觉原声EP将于2021年6月12日正式上架塞壬唱片官网及网易云音乐,敬请期待。<br />【歌曲列表】<br />1. CanNot Wait For<br />2. ManiFesto:<br />3. 灯华梦踏<br />4. 前航远歌<br /><br />二、【明日方舟·音律联觉】BILIBILI个性装扮套装即将上线,相关信息可关注明日方舟BILIBILI官方账号。<br /><br />三、明日方舟音律联觉主题黑胶礼盒现已上架,详情可关注“明日方舟朝陇山”。<br /><br />关注并转发本条微博,我们将通过<a href='/n/微博抽奖平台'>@微博抽奖平台</a> 抽取十位博士送出【音律联觉主题黑胶礼盒各一套】,将于6月12日开奖。<br />开奖后奖品会在出货后寄出。 <a href=\"https://video.weibo.com/show?fid=1034:4645779462357001\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_video_default.png'></span><span class=\"surl-text\">明日方舟Arknights的微博视频</span></a> <a href=\"https://lottery.media.weibo.com/lottery/h5/history/list?mid=4645748019299849\" data-hide=\"\"><span class='url-icon'><img style='width: 1rem;height: 1rem' src='https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_web_default.png'></span><span class=\"surl-text\">抽奖详情</span></a>",
|
||||||
"textLength": 663,
|
"textLength": 663,
|
||||||
"source": "微博视频号",
|
"source": "微博视频号",
|
||||||
"favorited": false,
|
"favorited": false,
|
||||||
"pic_ids": [],
|
"pic_ids": [],
|
||||||
"pic_types": "",
|
|
||||||
"is_paid": false,
|
"is_paid": false,
|
||||||
"mblog_vip_type": 0,
|
"mblog_vip_type": 0,
|
||||||
"user": {
|
"user": {
|
||||||
"id": 6279793937,
|
"id": 6279793937,
|
||||||
"screen_name": "明日方舟Arknights",
|
"screen_name": "明日方舟Arknights",
|
||||||
"profile_image_url": "https://tvax4.sinaimg.cn/crop.0.0.756.756.180/006QZngZly8gdj05mufr9j30l00l0dq4.jpg?KID=imgbed,tva&Expires=1623989141&ssig=bok%2BaSMkyI",
|
"profile_image_url": "https://tvax4.sinaimg.cn/crop.0.0.756.756.180/006QZngZly8gdj05mufr9j30l00l0dq4.jpg?KID=imgbed,tva&Expires=1651261093&ssig=Kt4QCJvDiS",
|
||||||
"profile_url": "https://m.weibo.cn/u/6279793937?uid=6279793937&luicode=20000061&lfid=4645748019299849",
|
"profile_url": "https://m.weibo.cn/u/6279793937?uid=6279793937&luicode=20000061&lfid=4645748019299849",
|
||||||
"statuses_count": 1229,
|
"statuses_count": 1682,
|
||||||
"verified": true,
|
"verified": true,
|
||||||
"verified_type": 2,
|
"verified_type": 2,
|
||||||
"verified_type_ext": 50,
|
"verified_type_ext": 50,
|
||||||
@ -75,26 +81,28 @@
|
|||||||
"gender": "f",
|
"gender": "f",
|
||||||
"mbtype": 12,
|
"mbtype": 12,
|
||||||
"urank": 4,
|
"urank": 4,
|
||||||
"mbrank": 6,
|
"mbrank": 7,
|
||||||
"follow_me": false,
|
"follow_me": false,
|
||||||
"following": false,
|
"following": false,
|
||||||
"followers_count": 1370905,
|
"follow_count": 37,
|
||||||
"follow_count": 33,
|
"followers_count": "149.9万",
|
||||||
|
"followers_count_str": "149.9万",
|
||||||
"cover_image_phone": "https://wx4.sinaimg.cn/crop.0.0.640.640.640/006QZngZly1gq8sa16csgj30u00u0akt.jpg",
|
"cover_image_phone": "https://wx4.sinaimg.cn/crop.0.0.640.640.640/006QZngZly1gq8sa16csgj30u00u0akt.jpg",
|
||||||
"avatar_hd": "https://wx4.sinaimg.cn/orj480/006QZngZly8gdj05mufr9j30l00l0dq4.jpg",
|
"avatar_hd": "https://wx4.sinaimg.cn/orj480/006QZngZly8gdj05mufr9j30l00l0dq4.jpg",
|
||||||
"like": false,
|
"like": false,
|
||||||
"like_me": false,
|
"like_me": false,
|
||||||
"badge": {
|
"badge": {
|
||||||
"user_name_certificate": 1
|
"user_name_certificate": 1,
|
||||||
|
"pc_new": 6,
|
||||||
|
"brand_account_2021": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reposts_count": 9036,
|
"reposts_count": 7640,
|
||||||
"comments_count": 2126,
|
"comments_count": 2206,
|
||||||
"attitudes_count": 37169,
|
"reprint_cmt_count": 0,
|
||||||
|
"attitudes_count": 39114,
|
||||||
"pending_approval_count": 0,
|
"pending_approval_count": 0,
|
||||||
"isLongText": true,
|
"isLongText": true,
|
||||||
"reward_exhibition_type": 0,
|
|
||||||
"hide_flag": 0,
|
|
||||||
"mlevel": 0,
|
"mlevel": 0,
|
||||||
"darwin_tags": [
|
"darwin_tags": [
|
||||||
{
|
{
|
||||||
@ -106,14 +114,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mblogtype": 0,
|
"mblogtype": 0,
|
||||||
"more_info_type": 0,
|
|
||||||
"content_auth": 0,
|
"content_auth": 0,
|
||||||
"safe_tags": 524288,
|
"safe_tags": 524288,
|
||||||
|
"comment_manage_info": {
|
||||||
|
"comment_permission_type": -1,
|
||||||
|
"approval_comment_type": 0,
|
||||||
|
"comment_sort_type": 0
|
||||||
|
},
|
||||||
"pic_num": 0,
|
"pic_num": 0,
|
||||||
"fid": 4645555891339375,
|
"fid": 4645555891339375,
|
||||||
"alchemy_params": {
|
"new_comment_style": 0,
|
||||||
"ug_red_envelope": false
|
|
||||||
},
|
|
||||||
"page_info": {
|
"page_info": {
|
||||||
"type": "video",
|
"type": "video",
|
||||||
"object_type": 11,
|
"object_type": 11,
|
||||||
@ -134,16 +144,16 @@
|
|||||||
"content1": "明日方舟Arknights的微博视频",
|
"content1": "明日方舟Arknights的微博视频",
|
||||||
"content2": "#明日方舟# #音律联觉#\n2021明日方舟音律联觉Ambience Synesthesia专场演出官方录播将于6月12日10:30正式上线,本次录播为大会员专享,相关信息可关注 http://mrfz.biligame.com/yllj/\n\n一、音律联觉原声EP将于2021年6",
|
"content2": "#明日方舟# #音律联觉#\n2021明日方舟音律联觉Ambience Synesthesia专场演出官方录播将于6月12日10:30正式上线,本次录播为大会员专享,相关信息可关注 http://mrfz.biligame.com/yllj/\n\n一、音律联觉原声EP将于2021年6",
|
||||||
"video_orientation": "horizontal",
|
"video_orientation": "horizontal",
|
||||||
"play_count": "90万次播放",
|
"play_count": "180万次播放",
|
||||||
"media_info": {
|
"media_info": {
|
||||||
"stream_url": "https://f.video.weibocdn.com/0041nQjugx07Ni6Zk3Qk01041200iTHD0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=40a32e8439c5409a63ccf853562a60ef&ori=0&ps=1BThihd3VLAY5R&Expires=1623981941&ssig=hSngFD8FpC&KID=unistore,video",
|
"stream_url": "https://f.video.weibocdn.com/0041nQjugx07Ni6Zk3Qk01041200iTHD0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=40a32e8439c5409a63ccf853562a60ef&ori=0&ps=1BThihd3VLAY5R&Expires=1651253893&ssig=Umld3VsLPh&KID=unistore,video",
|
||||||
"stream_url_hd": "https://f.video.weibocdn.com/0013IQ0Ugx07Ni6ZE67l01041200thj80E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=62b30a3f061b162e421008955c73f536&ori=0&ps=1BThihd3VLAY5R&Expires=1623981941&ssig=6VvgygBUL9&KID=unistore,video",
|
"stream_url_hd": "https://f.video.weibocdn.com/0013IQ0Ugx07Ni6ZE67l01041200thj80E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=62b30a3f061b162e421008955c73f536&ori=0&ps=1BThihd3VLAY5R&Expires=1651253893&ssig=ahb4z6%2BvPl&KID=unistore,video",
|
||||||
"duration": 103.1650000000000062527760746888816356658935546875
|
"duration": 103.1650000000000062527760746888816356658935546875
|
||||||
},
|
},
|
||||||
"urls": {
|
"urls": {
|
||||||
"mp4_720p_mp4": "https://f.video.weibocdn.com/004gx4yOgx07Ni70wB1601041200QZHs0E010.mp4?label=mp4_720p&template=1280x720.25.0&trans_finger=1f0da16358befad33323e3a1b7f95fc9&ori=0&ps=1BThihd3VLAY5R&Expires=1623981941&ssig=8QKq0RXs99&KID=unistore,video",
|
"mp4_720p_mp4": "https://f.video.weibocdn.com/004gx4yOgx07Ni70wB1601041200QZHs0E010.mp4?label=mp4_720p&template=1280x720.25.0&trans_finger=1f0da16358befad33323e3a1b7f95fc9&ori=0&ps=1BThihd3VLAY5R&Expires=1651253893&ssig=m8si69tT6A&KID=unistore,video",
|
||||||
"mp4_hd_mp4": "https://f.video.weibocdn.com/0013IQ0Ugx07Ni6ZE67l01041200thj80E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=62b30a3f061b162e421008955c73f536&ori=0&ps=1BThihd3VLAY5R&Expires=1623981941&ssig=6VvgygBUL9&KID=unistore,video",
|
"mp4_ld_mp4": "https://f.video.weibocdn.com/0041nQjugx07Ni6Zk3Qk01041200iTHD0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=40a32e8439c5409a63ccf853562a60ef&ori=0&ps=1BThihd3VLAY5R&Expires=1651253893&ssig=Umld3VsLPh&KID=unistore,video",
|
||||||
"mp4_ld_mp4": "https://f.video.weibocdn.com/0041nQjugx07Ni6Zk3Qk01041200iTHD0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=40a32e8439c5409a63ccf853562a60ef&ori=0&ps=1BThihd3VLAY5R&Expires=1623981941&ssig=hSngFD8FpC&KID=unistore,video"
|
"mp4_hd_mp4": "https://f.video.weibocdn.com/0013IQ0Ugx07Ni6ZE67l01041200thj80E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=62b30a3f061b162e421008955c73f536&ori=0&ps=1BThihd3VLAY5R&Expires=1651253893&ssig=ahb4z6%2BvPl&KID=unistore,video"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bid": "Kjc77D1jz",
|
"bid": "Kjc77D1jz",
|
||||||
@ -158,25 +168,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status_title": "明日方舟·音律联觉",
|
"status_title": "明日方舟·音律联觉",
|
||||||
"ok": 1,
|
"ok": 1
|
||||||
"scheme": "https://weibo.cn/appurl?scheme=sinaweibo%3A%2F%2Fdetail%3Fmblogid%3D4645748019299849%26luicode%3D20000061%26lfid%3D4645748019299849&luicode=20000061&lfid=4645748019299849",
|
|
||||||
"tipScheme": "https://weibo.cn/appurl?scheme=sinaweibo%3A%2F%2Fdetail%3Fmblogid%3D4645748019299849%26luicode%3D20000061%26lfid%3D4645748019299849&luicode=20000061&lfid=4645748019299849"
|
|
||||||
},
|
},
|
||||||
"hotScheme": "https://m.weibo.cn/p/index?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&luicode=20000061&lfid=4645748019299849",
|
"call": 1
|
||||||
"appScheme": "https://m.weibo.cn?luicode=20000061&lfid=4645748019299849",
|
|
||||||
"callUinversalLink": false,
|
|
||||||
"callWeibo": false,
|
|
||||||
"hit": true,
|
|
||||||
"is_gray": 0,
|
|
||||||
"schemeOrigin": false,
|
|
||||||
"appLink": "sinaweibo://detail?mblogid=4645748019299849&luicode=20000061&lfid=4645748019299849",
|
|
||||||
"xianzhi_scheme": "xianzhi://mblogshow?mid=4645748019299849",
|
|
||||||
"third_scheme": "sinaweibo://detail?mblogid=4645748019299849&luicode=20000061&lfid=4645748019299849",
|
|
||||||
"call": "1"
|
|
||||||
}][0] || {};
|
}][0] || {};
|
||||||
var __wb_performance_data={v:"v8",m:"mainsite",pwa:1,sw:0};
|
var __wb_performance_data={v:"v8",m:"mainsite",pwa:1,sw:0};
|
||||||
</script>
|
</script>
|
||||||
<script src="https://h5.sinaimg.cn/upload/1005/16/2017/11/30/wbp.js" id="__wb_performance_log" data-rate="0.1"></script>
|
<script src="https://h5.sinaimg.cn/upload/1005/16/2017/11/30/wbp.js" id="__wb_performance_log" data-rate="0.1"></script>
|
||||||
<script src="//h5.sinaimg.cn/m/weibo-lite/js/manifest.5ecace0f.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/vendor.36b3e5f0.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/app.fd9603ad.js"></script></body>
|
<script src="//h5.sinaimg.cn/m/weibo-lite/js/manifest.bb6ddc12.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/vendor.14bfc30c.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/app.11a3fee7.js"></script></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<style>html, body {margin: 0 !important;padding: 0 !important;}html, body, #app {height: 100%;}[v-cloak] {display: none;}.wb-item-wrap .card9.card{margin:0}.f-weibo .m-img-box{background-color:#e6e6e6}.empty-bg{width:100%;background-color:#e6e6e6;height:.375rem}.inline-block{display:inline-block}.txt-margin{margin:0 0 1rem 0}.width-min{width:4.375rem}.anim-load{animation:load .5s ease-out;-moz-animation:load .5s ease-out;-webkit-animation:load .5s ease-out;-o-animation:load .5s ease-out}@keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-moz-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-webkit-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}.f-more{letter-spacing:.1rem}.f-weibo .f-card-title{margin:-1rem -1rem .5rem -1rem;padding:0 1rem;border-width:0}.f-weibo .m-avatar-box .m-img-box .m-icon{font-size:14px}.iosx3 .card9 .f-card-title{border-width:0}.iosx2 .card9 .f-card-title{border-width:0}.f-weibo.card9{border-bottom:1px solid #e6e6e6}.iosx3 .f-weibo.card9{border-bottom:.36px solid #e6e6e6}.iosx2 .f-weibo.card9{border-bottom:.5px solid #e6e6e6}.f-weibo.card9>.card-wrap{margin-left:.75rem;margin-right:.75rem}.f-weibo.card9.m-panel{border-top-width:0}.f-weibo.card .card-wrap .f-col-wrap{padding:0 .9375rem}.f-weibo.card9 .m-box-col{min-width:0}.f-weibo.card9 .weibo-top{padding:0 0 0 .25rem}.f-weibo.card9 .weibo-top .m-box-col .m-icon{margin-left:3px}.f-weibo.card9 .weibo-main .weibo-og{padding:.75rem 0 0 .25rem}.f-weibo.card9 .weibo-main .card-wrap ~ .weibo-rp{margin-top:0.5rem}.f-weibo.card9 .weibo-main .media-b{margin:.625rem 0 -.375rem}.f-weibo.card9 .weibo-main .media-b .m-auto-list{margin:0 0 -.25rem}.f-weibo .weibo-top .m-text-box{margin:.15rem 0 .15rem .5rem}.f-weibo .f-r{float:right}.f-weibo .weibo-main .weibo-og{font-size:.9375rem}.f-weibo .weibo-rp .weibo-text{font-size:.9375rem}.f-weibo .weibo-rp .f-footer-ctrl{padding:0.625rem 0 0}.f-weibo .f-bg-img{background-size:cover;background-repeat:no-repeat;background-position:center;position:absolute;width:100%;height:100%}.f-footer-ctrl{border-top-width:0;height:1.1rem;padding: 1rem .375rem 1rem 0;margin: 0 0.75rem}.f-footer-ctrl .m-diy-btn{color:rgba(40,47,60,0.8);height:100%;float:left}.f-footer-ctrl .m-diy-btn+.m-diy-btn{margin-left:1.6875rem}.f-footer-ctrl .m-diy-btn .m-icon{font-size:16px}.f-footer-ctrl aside{float:right;color:rgba(40,47,60,0.8)}.f-footer-ctrl .m-font{font-size:1rem;vertical-align:middle}.f-footer-ctrl .m-diy-btn h4{font-size:.8125rem;display:inline-block;margin-top:0;margin-left:.25rem}.dbfalls a {color: #333;}.dbfalls .m-icon-like {filter: contrast(0);}</style>
|
<style>html, body {margin: 0 !important;padding: 0 !important;}html, body, #app {height: 100%;}[v-cloak] {display: none;}.wb-item-wrap .card9.card{margin:0}.f-weibo .m-img-box{background-color:#e6e6e6}.empty-bg{width:100%;background-color:#e6e6e6;height:.375rem}.inline-block{display:inline-block}.txt-margin{margin:0 0 1rem 0}.width-min{width:4.375rem}.anim-load{animation:load .5s ease-out;-moz-animation:load .5s ease-out;-webkit-animation:load .5s ease-out;-o-animation:load .5s ease-out}@keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-moz-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}@-webkit-keyframes load{0%{background-color:#fff}100%{background-color:#e6e6e6}}.f-more{letter-spacing:.1rem}.f-weibo .f-card-title{margin:-1rem -1rem .5rem -1rem;padding:0 1rem;border-width:0}.f-weibo .m-avatar-box .m-img-box .m-icon{font-size:14px}.iosx3 .card9 .f-card-title{border-width:0}.iosx2 .card9 .f-card-title{border-width:0}.f-weibo.card9{border-bottom:1px solid #e6e6e6}.iosx3 .f-weibo.card9{border-bottom:.36px solid #e6e6e6}.iosx2 .f-weibo.card9{border-bottom:.5px solid #e6e6e6}.f-weibo.card9>.card-wrap{margin-left:.75rem;margin-right:.75rem}.f-weibo.card9.m-panel{border-top-width:0}.f-weibo.card .card-wrap .f-col-wrap{padding:0 .9375rem}.f-weibo.card9 .m-box-col{min-width:0}.f-weibo.card9 .weibo-top{padding:0 0 0 .25rem}.f-weibo.card9 .weibo-top .m-box-col .m-icon{margin-left:3px}.f-weibo.card9 .weibo-main .weibo-og{padding:.75rem 0 0 .25rem}.f-weibo.card9 .weibo-main .card-wrap ~ .weibo-rp{margin-top:0.5rem}.f-weibo.card9 .weibo-main .media-b{margin:.625rem 0 -.375rem}.f-weibo.card9 .weibo-main .media-b .m-auto-list{margin:0 0 -.25rem}.f-weibo .weibo-top .m-text-box{margin:.15rem 0 .15rem .5rem}.f-weibo .f-r{float:right}.f-weibo .weibo-main .weibo-og{font-size:.9375rem}.f-weibo .weibo-rp .weibo-text{font-size:.9375rem}.f-weibo .weibo-rp .f-footer-ctrl{padding:0.625rem 0 0}.f-weibo .f-bg-img{background-size:cover;background-repeat:no-repeat;background-position:center;position:absolute;width:100%;height:100%}.f-footer-ctrl{border-top-width:0;height:1.1rem;padding: 1rem .375rem 1rem 0;margin: 0 0.75rem}.f-footer-ctrl .m-diy-btn{color:rgba(40,47,60,0.8);height:100%;float:left}.f-footer-ctrl .m-diy-btn+.m-diy-btn{margin-left:1.6875rem}.f-footer-ctrl .m-diy-btn .m-icon{font-size:16px}.f-footer-ctrl aside{float:right;color:rgba(40,47,60,0.8)}.f-footer-ctrl .m-font{font-size:1rem;vertical-align:middle}.f-footer-ctrl .m-diy-btn h4{font-size:.8125rem;display:inline-block;margin-top:0;margin-left:.25rem}.dbfalls a {color: #333;}.dbfalls .m-icon-like {filter: contrast(0);}</style>
|
||||||
<style>
|
<style>
|
||||||
</style>
|
</style>
|
||||||
<link href="//h5.sinaimg.cn/m/weibo-lite/css/app.952c2508.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.d90db39c.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/js/app.fd9603ad.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/manifest.5ecace0f.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/vendor.36b3e5f0.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.d90db39c.css" rel="stylesheet"><link href="//h5.sinaimg.cn/m/weibo-lite/css/app.952c2508.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="//h5.sinaimg.cn/m/weibo-lite/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="//h5.sinaimg.cn/m/weibo-lite/favicon-16.png"><link rel="manifest" href="//h5.sinaimg.cn/m/weibo-lite/manifest.json"><meta name="theme-color" content="#F3F3F3"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="微博Lite"><link rel="apple-touch-icon" href="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><link rel="mask-icon" href="//h5.sinaimg.cn/m/weibo-lite/mask-icon.svg" color="#F3F3F3"><meta name="msapplication-TileImage" content="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><meta name="msapplication-TileColor" content="#000000"></head>
|
<link href="//h5.sinaimg.cn/m/weibo-lite/css/app.2b65fef8.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.ed418b16.css" rel="preload" as="style"><link href="//h5.sinaimg.cn/m/weibo-lite/js/app.11a3fee7.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/manifest.bb6ddc12.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/js/vendor.14bfc30c.js" rel="preload" as="script"><link href="//h5.sinaimg.cn/m/weibo-lite/css/vendor.ed418b16.css" rel="stylesheet"><link href="//h5.sinaimg.cn/m/weibo-lite/css/app.2b65fef8.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="//h5.sinaimg.cn/m/weibo-lite/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="//h5.sinaimg.cn/m/weibo-lite/favicon-16.png"><link rel="manifest" href="//h5.sinaimg.cn/m/weibo-lite/manifest.json"><meta name="theme-color" content="#F3F3F3"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="微博Lite"><link rel="apple-touch-icon" href="//h5.sinaimg.cn/m/weibo-lite/appicon.png"><meta name="msapplication-TileColor" content="#000000"></head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app" class="m-container-max">
|
<div id="app" class="m-container-max">
|
||||||
@ -30,15 +30,23 @@
|
|||||||
<script>
|
<script>
|
||||||
var config = {
|
var config = {
|
||||||
env: 'prod',
|
env: 'prod',
|
||||||
version: 'v2.9.9',
|
version: 'v2.10.4',
|
||||||
login: [][0],
|
login: [][0],
|
||||||
st: '4ae7c5',
|
st: 'b26f2e',
|
||||||
uid: '',
|
uid: '',
|
||||||
pageConfig: [null][0] || {},
|
pageConfig: [null][0] || {},
|
||||||
preferQuickapp: '0',
|
preferQuickapp: '0',
|
||||||
wm: ''
|
wm: ''
|
||||||
}
|
}
|
||||||
var $render_data = [{
|
var $render_data = [{
|
||||||
|
"hotScheme": "https://m.weibo.cn/p/index?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&luicode=20000061&lfid=4649031014551911",
|
||||||
|
"appScheme": "https://m.weibo.cn?luicode=20000061&lfid=4649031014551911",
|
||||||
|
"callUinversalLink": false,
|
||||||
|
"callWeibo": false,
|
||||||
|
"schemeOrigin": false,
|
||||||
|
"appLink": "sinaweibo://detail?mblogid=4649031014551911&luicode=20000061&lfid=4649031014551911",
|
||||||
|
"xianzhi_scheme": "xianzhi://mblogshow?mid=4649031014551911",
|
||||||
|
"third_scheme": "sinaweibo://detail?mblogid=4649031014551911&luicode=20000061&lfid=4649031014551911",
|
||||||
"status": {
|
"status": {
|
||||||
"visible": {
|
"visible": {
|
||||||
"type": 0,
|
"type": 0,
|
||||||
@ -49,14 +57,13 @@
|
|||||||
"mid": "4649031014551911",
|
"mid": "4649031014551911",
|
||||||
"can_edit": false,
|
"can_edit": false,
|
||||||
"show_additional_indication": 0,
|
"show_additional_indication": 0,
|
||||||
"text": "<a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&isnewpage=1&luicode=20000061&lfid=4649031014551911\" data-hide=\"\"><span class=\"surl-text\">#明日方舟#</span></a> 06月17日16:00闪断更新公告 <br /><br />感谢您对《明日方舟》的关注与支持。《明日方舟》计划将于2021年06月17日16:00 ~ 16:10 期间进行服务器闪断更新。届时将造成玩家强制掉线,无法登录等问题。 为确保您的游戏内帐号数据正常,请在本次闪断更新时提前结束关卡。本次更新给各位玩家带来的不便,敬请谅解!<br /><br />闪断更新时间:<br />2021年06月17日16:00 ~ 16:10 期间<br /><br />更新内容:<br />◆SideStory「沃伦姆德的薄暮」复刻活动开启<br />◆调整了基建奖章下【家装建构奖章】的计数规则<br />◆修复了【绮良】技能“锚点捕捉”开启时,无法选中部分敌方单位的问题<br /><br />闪断补偿:合成玉*200<br />补偿范围:2021年06月17日16:00更新前所有注册并创建角色的玩家(含游客账号)<br /><br />*本次维护不排除延迟开启的可能,如若延迟则请关注官方发布的具体开服时间*",
|
"text": "<a href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&extparam=%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&luicode=20000061&lfid=4649031014551911\" data-hide=\"\"><span class=\"surl-text\">#明日方舟#</span></a> 06月17日16:00闪断更新公告 <br /><br />感谢您对《明日方舟》的关注与支持。《明日方舟》计划将于2021年06月17日16:00 ~ 16:10 期间进行服务器闪断更新。届时将造成玩家强制掉线,无法登录等问题。 为确保您的游戏内帐号数据正常,请在本次闪断更新时提前结束关卡。本次更新给各位玩家带来的不便,敬请谅解!<br /><br />闪断更新时间:<br />2021年06月17日16:00 ~ 16:10 期间<br /><br />更新内容:<br />◆SideStory「沃伦姆德的薄暮」复刻活动开启<br />◆调整了基建奖章下【家装建构奖章】的计数规则<br />◆修复了【绮良】技能“锚点捕捉”开启时,无法选中部分敌方单位的问题<br /><br />闪断补偿:合成玉*200<br />补偿范围:2021年06月17日16:00更新前所有注册并创建角色的玩家(含游客账号)<br /><br />*本次维护不排除延迟开启的可能,如若延迟则请关注官方发布的具体开服时间*",
|
||||||
"textLength": 671,
|
"textLength": 671,
|
||||||
"source": "微博 weibo.com",
|
"source": "微博 weibo.com",
|
||||||
"favorited": false,
|
"favorited": false,
|
||||||
"pic_ids": [
|
"pic_ids": [
|
||||||
"006QZngZgy1grl2q3n98jj30rs2084qp"
|
"006QZngZgy1grl2q3n98jj30rs2084qp"
|
||||||
],
|
],
|
||||||
"pic_types": "",
|
|
||||||
"thumbnail_pic": "https://wx1.sinaimg.cn/thumbnail/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
"thumbnail_pic": "https://wx1.sinaimg.cn/thumbnail/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
||||||
"bmiddle_pic": "http://wx1.sinaimg.cn/bmiddle/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
"bmiddle_pic": "http://wx1.sinaimg.cn/bmiddle/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
||||||
"original_pic": "https://wx1.sinaimg.cn/large/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
"original_pic": "https://wx1.sinaimg.cn/large/006QZngZgy1grl2q3n98jj30rs2084qp.jpg",
|
||||||
@ -65,9 +72,9 @@
|
|||||||
"user": {
|
"user": {
|
||||||
"id": 6279793937,
|
"id": 6279793937,
|
||||||
"screen_name": "明日方舟Arknights",
|
"screen_name": "明日方舟Arknights",
|
||||||
"profile_image_url": "https://tvax4.sinaimg.cn/crop.0.0.756.756.180/006QZngZly8gdj05mufr9j30l00l0dq4.jpg?KID=imgbed,tva&Expires=1623934220&ssig=peAOY3wvpb",
|
"profile_image_url": "https://tvax4.sinaimg.cn/crop.0.0.756.756.180/006QZngZly8gdj05mufr9j30l00l0dq4.jpg?KID=imgbed,tva&Expires=1651261073&ssig=MxMwuX7WU4",
|
||||||
"profile_url": "https://m.weibo.cn/u/6279793937?uid=6279793937&luicode=20000061&lfid=4649031014551911",
|
"profile_url": "https://m.weibo.cn/u/6279793937?uid=6279793937&luicode=20000061&lfid=4649031014551911",
|
||||||
"statuses_count": 1229,
|
"statuses_count": 1682,
|
||||||
"verified": true,
|
"verified": true,
|
||||||
"verified_type": 2,
|
"verified_type": 2,
|
||||||
"verified_type_ext": 50,
|
"verified_type_ext": 50,
|
||||||
@ -77,56 +84,60 @@
|
|||||||
"gender": "f",
|
"gender": "f",
|
||||||
"mbtype": 12,
|
"mbtype": 12,
|
||||||
"urank": 4,
|
"urank": 4,
|
||||||
"mbrank": 6,
|
"mbrank": 7,
|
||||||
"follow_me": false,
|
"follow_me": false,
|
||||||
"following": false,
|
"following": false,
|
||||||
"followers_count": 1370671,
|
"follow_count": 37,
|
||||||
"follow_count": 33,
|
"followers_count": "149.9万",
|
||||||
|
"followers_count_str": "149.9万",
|
||||||
"cover_image_phone": "https://wx4.sinaimg.cn/crop.0.0.640.640.640/006QZngZly1gq8sa16csgj30u00u0akt.jpg",
|
"cover_image_phone": "https://wx4.sinaimg.cn/crop.0.0.640.640.640/006QZngZly1gq8sa16csgj30u00u0akt.jpg",
|
||||||
"avatar_hd": "https://wx4.sinaimg.cn/orj480/006QZngZly8gdj05mufr9j30l00l0dq4.jpg",
|
"avatar_hd": "https://wx4.sinaimg.cn/orj480/006QZngZly8gdj05mufr9j30l00l0dq4.jpg",
|
||||||
"like": false,
|
"like": false,
|
||||||
"like_me": false,
|
"like_me": false,
|
||||||
"badge": {
|
"badge": {
|
||||||
"user_name_certificate": 1
|
"user_name_certificate": 1,
|
||||||
|
"pc_new": 6,
|
||||||
|
"brand_account_2021": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"picStatus": "1",
|
"picStatus": "1",
|
||||||
"reposts_count": 83,
|
"reposts_count": 81,
|
||||||
"comments_count": 583,
|
"comments_count": 656,
|
||||||
"attitudes_count": 16670,
|
"reprint_cmt_count": 0,
|
||||||
|
"attitudes_count": 20119,
|
||||||
"pending_approval_count": 0,
|
"pending_approval_count": 0,
|
||||||
"isLongText": true,
|
"isLongText": true,
|
||||||
"reward_exhibition_type": 0,
|
|
||||||
"hide_flag": 0,
|
|
||||||
"mlevel": 0,
|
"mlevel": 0,
|
||||||
"darwin_tags": [
|
"darwin_tags": [
|
||||||
{
|
{
|
||||||
"object_type": "fangle",
|
"object_type": "fangle",
|
||||||
"object_id": "1022:23126100007595647269150721",
|
"object_id": "1022:23126100007583245918607363",
|
||||||
"display_name": "1 份奖品待领取",
|
"display_name": "热门游戏 动态»",
|
||||||
"enterprise_uid": null,
|
"enterprise_uid": null,
|
||||||
"bd_object_type": "fangle"
|
"bd_object_type": "fangle"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mblogtype": 0,
|
"mblogtype": 0,
|
||||||
"more_info_type": 0,
|
|
||||||
"number_display_strategy": {
|
"number_display_strategy": {
|
||||||
"apply_scenario_flag": 3,
|
"apply_scenario_flag": 3,
|
||||||
"display_text_min_number": 1000000,
|
"display_text_min_number": 1000000,
|
||||||
"display_text": "100万+"
|
"display_text": "100万+"
|
||||||
},
|
},
|
||||||
"content_auth": 0,
|
"content_auth": 0,
|
||||||
"pic_num": 1,
|
"comment_manage_info": {
|
||||||
"alchemy_params": {
|
"comment_permission_type": -1,
|
||||||
"ug_red_envelope": false
|
"approval_comment_type": 0,
|
||||||
|
"comment_sort_type": 0
|
||||||
},
|
},
|
||||||
|
"pic_num": 1,
|
||||||
|
"new_comment_style": 0,
|
||||||
"page_info": {
|
"page_info": {
|
||||||
"type": "search_topic",
|
"type": "search_topic",
|
||||||
"object_type": 0,
|
"object_type": 0,
|
||||||
"page_pic": {
|
"page_pic": {
|
||||||
"url": "https://wx4.sinaimg.cn/large/006QZngZly1gebqvb31dcj30dw0dwgn4.jpg"
|
"url": "https://wx4.sinaimg.cn/large/006QZngZly1gebqvb31dcj30dw0dwgn4.jpg"
|
||||||
},
|
},
|
||||||
"page_url": "https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&isnewpage=1&luicode=20000061&lfid=4649031014551911",
|
"page_url": "https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&extparam=%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23&luicode=20000061&lfid=4649031014551911",
|
||||||
"page_title": "#明日方舟#",
|
"page_title": "#明日方舟#",
|
||||||
"content1": "0讨论 0阅读 "
|
"content1": "0讨论 0阅读 "
|
||||||
},
|
},
|
||||||
@ -163,25 +174,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status_title": "家装建构奖章",
|
"status_title": "家装建构奖章",
|
||||||
"ok": 1,
|
"ok": 1
|
||||||
"scheme": "https://weibo.cn/appurl?scheme=sinaweibo%3A%2F%2Fdetail%3Fmblogid%3D4649031014551911%26luicode%3D20000061%26lfid%3D4649031014551911&luicode=20000061&lfid=4649031014551911",
|
|
||||||
"tipScheme": "https://weibo.cn/appurl?scheme=sinaweibo%3A%2F%2Fdetail%3Fmblogid%3D4649031014551911%26luicode%3D20000061%26lfid%3D4649031014551911&luicode=20000061&lfid=4649031014551911"
|
|
||||||
},
|
},
|
||||||
"hotScheme": "https://m.weibo.cn/p/index?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&luicode=20000061&lfid=4649031014551911",
|
"call": 1
|
||||||
"appScheme": "https://m.weibo.cn?luicode=20000061&lfid=4649031014551911",
|
|
||||||
"callUinversalLink": false,
|
|
||||||
"callWeibo": false,
|
|
||||||
"hit": true,
|
|
||||||
"is_gray": 1,
|
|
||||||
"schemeOrigin": false,
|
|
||||||
"appLink": "sinaweibo://detail?mblogid=4649031014551911&luicode=20000061&lfid=4649031014551911",
|
|
||||||
"xianzhi_scheme": "xianzhi://mblogshow?mid=4649031014551911",
|
|
||||||
"third_scheme": "sinaweibo://detail?mblogid=4649031014551911&luicode=20000061&lfid=4649031014551911",
|
|
||||||
"call": "1"
|
|
||||||
}][0] || {};
|
}][0] || {};
|
||||||
var __wb_performance_data={v:"v8",m:"mainsite",pwa:1,sw:0};
|
var __wb_performance_data={v:"v8",m:"mainsite",pwa:1,sw:0};
|
||||||
</script>
|
</script>
|
||||||
<script src="https://h5.sinaimg.cn/upload/1005/16/2017/11/30/wbp.js" id="__wb_performance_log" data-rate="0.1"></script>
|
<script src="https://h5.sinaimg.cn/upload/1005/16/2017/11/30/wbp.js" id="__wb_performance_log" data-rate="0.1"></script>
|
||||||
<script src="//h5.sinaimg.cn/m/weibo-lite/js/manifest.5ecace0f.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/vendor.36b3e5f0.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/app.fd9603ad.js"></script></body>
|
<script src="//h5.sinaimg.cn/m/weibo-lite/js/manifest.bb6ddc12.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/vendor.14bfc30c.js"></script><script src="//h5.sinaimg.cn/m/weibo-lite/js/app.11a3fee7.js"></script></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,6 +18,11 @@ def arknights_list_0():
|
|||||||
return get_json("arknights_list_0.json")
|
return get_json("arknights_list_0.json")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="module")
|
||||||
|
def arknights_list__1():
|
||||||
|
return get_json("arknights_list_-1.json")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def arknights_list_1():
|
def arknights_list_1():
|
||||||
return get_json("arknights_list_1.json")
|
return get_json("arknights_list_1.json")
|
||||||
@ -36,6 +41,73 @@ def monster_siren_list_1():
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
@respx.mock
|
@respx.mock
|
||||||
async def test_fetch_new(
|
async def test_fetch_new(
|
||||||
|
arknights,
|
||||||
|
dummy_user_subinfo,
|
||||||
|
arknights_list_0,
|
||||||
|
arknights_list__1,
|
||||||
|
monster_siren_list_0,
|
||||||
|
monster_siren_list_1,
|
||||||
|
):
|
||||||
|
ak_list_router = respx.get(
|
||||||
|
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/announcement.meta.json"
|
||||||
|
)
|
||||||
|
detail_router = respx.get(
|
||||||
|
"https://ak.hycdn.cn/announce/IOS/announcement/807_1640060583.html"
|
||||||
|
)
|
||||||
|
version_router = respx.get(
|
||||||
|
"https://ak-conf.hypergryph.com/config/prod/official/IOS/version"
|
||||||
|
)
|
||||||
|
preannouncement_router = respx.get(
|
||||||
|
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/preannouncement.meta.json"
|
||||||
|
)
|
||||||
|
monster_siren_router = respx.get("https://monster-siren.hypergryph.com/api/news")
|
||||||
|
terra_list = respx.get("https://terra-historicus.hypergryph.com/api/recentUpdate")
|
||||||
|
ak_list_router.mock(return_value=Response(200, json=arknights_list__1))
|
||||||
|
detail_router.mock(
|
||||||
|
return_value=Response(200, text=get_file("arknights-detail-807"))
|
||||||
|
)
|
||||||
|
version_router.mock(
|
||||||
|
return_value=Response(200, json=get_json("arknights-version-0.json"))
|
||||||
|
)
|
||||||
|
preannouncement_router.mock(
|
||||||
|
return_value=Response(200, json=get_json("arknights-pre-0.json"))
|
||||||
|
)
|
||||||
|
monster_siren_router.mock(return_value=Response(200, json=monster_siren_list_0))
|
||||||
|
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-0.json")))
|
||||||
|
target = ""
|
||||||
|
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
|
||||||
|
assert ak_list_router.called
|
||||||
|
assert len(res) == 0
|
||||||
|
assert not detail_router.called
|
||||||
|
mock_data = arknights_list_0
|
||||||
|
ak_list_router.mock(return_value=Response(200, json=mock_data))
|
||||||
|
res3 = await arknights.fetch_new_post(target, [dummy_user_subinfo])
|
||||||
|
assert len(res3[0][1]) == 1
|
||||||
|
assert detail_router.called
|
||||||
|
post = res3[0][1][0]
|
||||||
|
assert post.target_type == "arknights"
|
||||||
|
assert post.text == ""
|
||||||
|
assert post.url == ""
|
||||||
|
assert post.target_name == "明日方舟游戏内公告"
|
||||||
|
assert len(post.pics) == 1
|
||||||
|
# assert(post.pics == ['https://ak-fs.hypergryph.com/announce/images/20210623/e6f49aeb9547a2278678368a43b95b07.jpg'])
|
||||||
|
print(res3[0][1])
|
||||||
|
await post.generate_messages()
|
||||||
|
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-1.json")))
|
||||||
|
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
|
||||||
|
assert len(res) == 1
|
||||||
|
post = res[0][1][0]
|
||||||
|
assert post.target_type == "terra-historicus"
|
||||||
|
assert post.text == "123罗德岛!? - 「掠风」篇"
|
||||||
|
assert post.url == "https://terra-historicus.hypergryph.com/comic/6253/episode/4938"
|
||||||
|
assert post.pics == [
|
||||||
|
"https://web.hycdn.cn/comic/pic/20220507/ab8a2ff408ec7d587775aed70b178ec0.png"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.render
|
||||||
|
@respx.mock
|
||||||
|
async def test_send_with_render(
|
||||||
arknights,
|
arknights,
|
||||||
dummy_user_subinfo,
|
dummy_user_subinfo,
|
||||||
arknights_list_0,
|
arknights_list_0,
|
||||||
@ -56,6 +128,7 @@ async def test_fetch_new(
|
|||||||
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/preannouncement.meta.json"
|
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/preannouncement.meta.json"
|
||||||
)
|
)
|
||||||
monster_siren_router = respx.get("https://monster-siren.hypergryph.com/api/news")
|
monster_siren_router = respx.get("https://monster-siren.hypergryph.com/api/news")
|
||||||
|
terra_list = respx.get("https://terra-historicus.hypergryph.com/api/recentUpdate")
|
||||||
ak_list_router.mock(return_value=Response(200, json=arknights_list_0))
|
ak_list_router.mock(return_value=Response(200, json=arknights_list_0))
|
||||||
detail_router.mock(
|
detail_router.mock(
|
||||||
return_value=Response(200, text=get_file("arknights-detail-805"))
|
return_value=Response(200, text=get_file("arknights-detail-805"))
|
||||||
@ -67,6 +140,7 @@ async def test_fetch_new(
|
|||||||
return_value=Response(200, json=get_json("arknights-pre-0.json"))
|
return_value=Response(200, json=get_json("arknights-pre-0.json"))
|
||||||
)
|
)
|
||||||
monster_siren_router.mock(return_value=Response(200, json=monster_siren_list_0))
|
monster_siren_router.mock(return_value=Response(200, json=monster_siren_list_0))
|
||||||
|
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-0.json")))
|
||||||
target = ""
|
target = ""
|
||||||
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
|
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
|
||||||
assert ak_list_router.called
|
assert ak_list_router.called
|
||||||
|
@ -27,7 +27,14 @@ def weibo_ak_list_1():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
@respx.mock
|
||||||
async def test_get_name(weibo):
|
async def test_get_name(weibo):
|
||||||
|
profile_router = respx.get(
|
||||||
|
"https://m.weibo.cn/api/container/getIndex?containerid=1005056279793937"
|
||||||
|
)
|
||||||
|
profile_router.mock(
|
||||||
|
return_value=Response(200, json=get_json("weibo_ak_profile.json"))
|
||||||
|
)
|
||||||
name = await weibo.get_target_name("6279793937")
|
name = await weibo.get_target_name("6279793937")
|
||||||
assert name == "明日方舟Arknights"
|
assert name == "明日方舟Arknights"
|
||||||
|
|
||||||
|
@ -284,3 +284,49 @@ async def test_abort_add_on_tag(app: App):
|
|||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
ctx.should_finished()
|
ctx.should_finished()
|
||||||
|
|
||||||
|
|
||||||
|
# 删除订阅阶段中止
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_abort_del_sub(app: App):
|
||||||
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
|
from nonebot.adapters.onebot.v11.message import Message
|
||||||
|
from nonebot_bison.config import Config
|
||||||
|
from nonebot_bison.config_manager import del_sub_matcher
|
||||||
|
from nonebot_bison.platform import platform_manager
|
||||||
|
|
||||||
|
config = Config()
|
||||||
|
config.user_target.truncate()
|
||||||
|
config.add_subscribe(
|
||||||
|
10000,
|
||||||
|
"group",
|
||||||
|
"6279793937",
|
||||||
|
"明日方舟Arknights",
|
||||||
|
"weibo",
|
||||||
|
[platform_manager["weibo"].reverse_category["图文"]],
|
||||||
|
["明日方舟"],
|
||||||
|
)
|
||||||
|
async with app.test_matcher(del_sub_matcher) as ctx:
|
||||||
|
bot = ctx.create_bot(base=Bot)
|
||||||
|
assert isinstance(bot, Bot)
|
||||||
|
event = fake_group_message_event(
|
||||||
|
message=Message("删除订阅"), to_me=True, sender=fake_admin_user
|
||||||
|
)
|
||||||
|
ctx.receive_event(bot, event)
|
||||||
|
ctx.should_pass_rule()
|
||||||
|
ctx.should_pass_permission()
|
||||||
|
ctx.should_call_send(
|
||||||
|
event,
|
||||||
|
Message(
|
||||||
|
"订阅的帐号为:\n1 weibo 明日方舟Arknights 6279793937\n [图文] 明日方舟\n请输入要删除的订阅的序号\n输入'取消'中止"
|
||||||
|
),
|
||||||
|
True,
|
||||||
|
)
|
||||||
|
event_abort = fake_group_message_event(
|
||||||
|
message=Message("取消"), sender=fake_admin_user
|
||||||
|
)
|
||||||
|
ctx.receive_event(bot, event_abort)
|
||||||
|
ctx.should_call_send(event_abort, "删除中止", True)
|
||||||
|
ctx.should_finished()
|
||||||
|
subs = config.list_subscribe(10000, "group")
|
||||||
|
assert subs
|
||||||
|
@ -67,7 +67,7 @@ async def test_del_sub(app: App):
|
|||||||
ctx.should_call_send(
|
ctx.should_call_send(
|
||||||
event,
|
event,
|
||||||
Message(
|
Message(
|
||||||
"订阅的帐号为:\n1 weibo 明日方舟Arknights 6279793937\n [图文] 明日方舟\n请输入要删除的订阅的序号"
|
"订阅的帐号为:\n1 weibo 明日方舟Arknights 6279793937\n [图文] 明日方舟\n请输入要删除的订阅的序号\n输入'取消'中止"
|
||||||
),
|
),
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
@ -85,3 +85,30 @@ async def test_del_sub(app: App):
|
|||||||
ctx.should_finished()
|
ctx.should_finished()
|
||||||
subs = config.list_subscribe(10000, "group")
|
subs = config.list_subscribe(10000, "group")
|
||||||
assert len(subs) == 0
|
assert len(subs) == 0
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_del_empty_sub(app: App):
|
||||||
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
|
from nonebot.adapters.onebot.v11.message import Message
|
||||||
|
from nonebot_bison.config import Config
|
||||||
|
from nonebot_bison.config_manager import del_sub_matcher
|
||||||
|
from nonebot_bison.platform import platform_manager
|
||||||
|
|
||||||
|
config = Config()
|
||||||
|
config.user_target.truncate()
|
||||||
|
async with app.test_matcher(del_sub_matcher) as ctx:
|
||||||
|
bot = ctx.create_bot(base=Bot)
|
||||||
|
assert isinstance(bot, Bot)
|
||||||
|
event = fake_group_message_event(
|
||||||
|
message=Message("删除订阅"), to_me=True, sender=fake_admin_user
|
||||||
|
)
|
||||||
|
ctx.receive_event(bot, event)
|
||||||
|
ctx.should_pass_rule()
|
||||||
|
ctx.should_pass_permission()
|
||||||
|
ctx.should_finished()
|
||||||
|
ctx.should_call_send(
|
||||||
|
event,
|
||||||
|
"暂无已订阅账号\n请使用“添加订阅”命令添加订阅",
|
||||||
|
True,
|
||||||
|
)
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import asyncio
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from nonebot.adapters.onebot.v11.message import Message
|
||||||
from nonebug import App
|
from nonebug import App
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_send_no_queue(app: App):
|
async def test_send_no_queue(app: App):
|
||||||
import nonebot
|
|
||||||
from nonebot.adapters.onebot.v11.bot import Bot
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
|
from nonebot.adapters.onebot.v11.message import Message
|
||||||
from nonebot_bison.plugin_config import plugin_config
|
from nonebot_bison.plugin_config import plugin_config
|
||||||
from nonebot_bison.send import send_msgs
|
from nonebot_bison.send import send_msgs
|
||||||
|
|
||||||
@ -16,16 +15,16 @@ async def test_send_no_queue(app: App):
|
|||||||
bot = ctx.create_bot(base=Bot)
|
bot = ctx.create_bot(base=Bot)
|
||||||
assert isinstance(bot, Bot)
|
assert isinstance(bot, Bot)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
"send_group_msg", {"group_id": "1233", "message": "msg1"}, True
|
"send_group_msg", {"group_id": "1233", "message": Message("msg1")}, True
|
||||||
)
|
)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
"send_group_msg", {"group_id": "1233", "message": "msg2"}, True
|
"send_group_msg", {"group_id": "1233", "message": Message("msg2")}, True
|
||||||
)
|
)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
"send_private_msg", {"user_id": "666", "message": "priv"}, True
|
"send_private_msg", {"user_id": "666", "message": Message("priv")}, True
|
||||||
)
|
)
|
||||||
await send_msgs(bot, "1233", "group", ["msg1", "msg2"])
|
await send_msgs(bot, "1233", "group", [Message("msg1"), Message("msg2")])
|
||||||
await send_msgs(bot, "666", "private", ["priv"])
|
await send_msgs(bot, "666", "private", [Message("priv")])
|
||||||
assert ctx.wait_list.empty()
|
assert ctx.wait_list.empty()
|
||||||
|
|
||||||
|
|
||||||
@ -33,9 +32,10 @@ async def test_send_no_queue(app: App):
|
|||||||
async def test_send_queue(app: App):
|
async def test_send_queue(app: App):
|
||||||
import nonebot
|
import nonebot
|
||||||
from nonebot.adapters.onebot.v11.bot import Bot
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
|
from nonebot.adapters.onebot.v11.message import Message
|
||||||
from nonebot_bison import send
|
from nonebot_bison import send
|
||||||
from nonebot_bison.plugin_config import plugin_config
|
from nonebot_bison.plugin_config import plugin_config
|
||||||
from nonebot_bison.send import LAST_SEND_TIME, do_send_msgs, send_msgs
|
from nonebot_bison.send import do_send_msgs, send_msgs
|
||||||
|
|
||||||
async with app.test_api() as ctx:
|
async with app.test_api() as ctx:
|
||||||
new_bot = ctx.create_bot(base=Bot)
|
new_bot = ctx.create_bot(base=Bot)
|
||||||
@ -48,7 +48,7 @@ async def test_send_queue(app: App):
|
|||||||
"send_group_msg", {"group_id": "1233", "message": "test msg"}, True
|
"send_group_msg", {"group_id": "1233", "message": "test msg"}, True
|
||||||
)
|
)
|
||||||
await bot.call_api("send_group_msg", group_id="1233", message="test msg")
|
await bot.call_api("send_group_msg", group_id="1233", message="test msg")
|
||||||
await send_msgs(bot, "1233", "group", ["msg"])
|
await send_msgs(bot, "1233", "group", [Message("msg")])
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
"send_group_msg", {"group_id": "1233", "message": "msg"}, True
|
"send_group_msg", {"group_id": "1233", "message": "msg"}, True
|
||||||
)
|
)
|
||||||
@ -59,6 +59,14 @@ async def test_send_queue(app: App):
|
|||||||
assert ctx.wait_list.empty()
|
assert ctx.wait_list.empty()
|
||||||
|
|
||||||
|
|
||||||
|
def gen_node(id, name, content: Message):
|
||||||
|
return {"type": "node", "data": {"name": name, "uin": id, "content": content}}
|
||||||
|
|
||||||
|
|
||||||
|
def _merge_messge(nodes):
|
||||||
|
return nodes
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_send_merge_no_queue(app: App):
|
async def test_send_merge_no_queue(app: App):
|
||||||
from nonebot.adapters.onebot.v11.bot import Bot
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
@ -103,15 +111,8 @@ async def test_send_merge_no_queue(app: App):
|
|||||||
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
||||||
{"user_id": 8888, "card": "admin", "nickname": "adminuser"},
|
{"user_id": 8888, "card": "admin", "nickname": "adminuser"},
|
||||||
)
|
)
|
||||||
merged_message = Message(
|
merged_message = _merge_messge(
|
||||||
[
|
[gen_node(8888, "admin", message[1]), gen_node(8888, "admin", message[2])]
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="admin", content=message[1]
|
|
||||||
),
|
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="admin", content=message[2]
|
|
||||||
),
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
"send_group_forward_msg",
|
"send_group_forward_msg",
|
||||||
@ -136,17 +137,11 @@ async def test_send_merge_no_queue(app: App):
|
|||||||
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
||||||
{"user_id": 8888, "card": None, "nickname": "adminuser"},
|
{"user_id": 8888, "card": None, "nickname": "adminuser"},
|
||||||
)
|
)
|
||||||
merged_message = Message(
|
merged_message = _merge_messge(
|
||||||
[
|
[
|
||||||
MessageSegment.node_custom(
|
gen_node(8888, "adminuser", message[1]),
|
||||||
user_id=8888, nickname="adminuser", content=message[1]
|
gen_node(8888, "adminuser", message[2]),
|
||||||
),
|
gen_node(8888, "adminuser", message[3]),
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="adminuser", content=message[2]
|
|
||||||
),
|
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="adminuser", content=message[3]
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
@ -198,17 +193,11 @@ async def test_send_merge2_no_queue(app: App):
|
|||||||
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
{"group_id": 633, "user_id": 8888, "no_cache": True},
|
||||||
{"user_id": 8888, "card": "admin", "nickname": "adminuser"},
|
{"user_id": 8888, "card": "admin", "nickname": "adminuser"},
|
||||||
)
|
)
|
||||||
merged_message = Message(
|
merged_message = _merge_messge(
|
||||||
[
|
[
|
||||||
MessageSegment.node_custom(
|
gen_node(8888, "admin", message[0]),
|
||||||
user_id=8888, nickname="admin", content=message[0]
|
gen_node(8888, "admin", message[1]),
|
||||||
),
|
gen_node(8888, "admin", message[2]),
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="admin", content=message[1]
|
|
||||||
),
|
|
||||||
MessageSegment.node_custom(
|
|
||||||
user_id=8888, nickname="admin", content=message[2]
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
ctx.should_call_api(
|
ctx.should_call_api(
|
||||||
|
@ -414,9 +414,9 @@
|
|||||||
vue-demi "*"
|
vue-demi "*"
|
||||||
|
|
||||||
ansi-regex@^5.0.0:
|
ansi-regex@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.1"
|
||||||
resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||||
integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=
|
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||||
|
|
||||||
ansi-styles@^4.1.0:
|
ansi-styles@^4.1.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user