Git Product home page Git Product logo

bilibili2bangumi's Introduction

Bilibili2Bangumi GitHub

Bilibili 订阅动画迁移至 Bangumi,保留原追番状态并自动点格子。

欢迎 PR。

安装

该程序运行在 Python 3.7+ 并要求安装 pip

首先克隆或下载 Bilibili2Bangumi 仓库并切换到程序根目录:

$ git clone https://github.com/wopub/Bilibili2Bangumi.git
$ cd Bilibili2Bangumi

依赖安装

Pipenv(推荐)

如果没有安装包管理器 pipenv ,请安装:

$ pip install pipenv

再安装依赖包:

$ pipenv install

或者使用清华大学开源软件镜像源:

$ pipenv install --pypi-mirror https://pypi.tuna.tsinghua.edu.cn/simple

Pip

$ pip install -r requirements.txt

使用

先按下述修改完配置文件。

如果使用了 Pipenv 来安装依赖则通过 Pipenv 运行:

$ pipenv run python bili2bgm.py

或者如果使用了 Pip 来安装依赖则直接运行:

$ python bili2bgm.py

程序运行时会显示当前进度和因各种原因而迁移失败的数据。

修改配置文件 config.py

将仓库根目录下 config.py.example 修改为 config.py。之后按下述配置参数。

  1. bilibili_api 授权设置:

    config.py 中填入需要迁移用户的 Bilibili UID

    如果要迁移 隐私设置未公开 的 Bilibili 追番数据,则需要获取身份验证信息,获取方法详见此处

    获取后在 config.py 中填入 SESSDATABILI_JCTBUVID3 信息。

    注意,请不要泄露这些信息给他人,否则你的账号将可能遭受被盗的风险!

  2. Bangumi API OAuth2 授权配置:

    由于 Bangumi API 只提供 Oauth2 授权码方式,需获取并填入 App IDApp Secret

    1. Bangumi 开发平台 中创建新应用,如下图

      image

      类型选 “应用”,其余随意填写

      image

    2. 获取 App IDApp Secret,并将 回调地址 设置为 http://localhost:3000

      注意,请不要泄露这些信息给他人,否则你的应用权限将可能遭受被盗用的风险!

      image

    3. App IDApp Secret 填入 config.py 中。

  3. 其他设置:

    bool 类型的设置请填入 True(启用)或 False(禁用),int 类型的设置请填入整数。

    名称 说明 类型 默认值
    PARSE_EPISODE_PROGRESS 自动点在看动画的格子(无论隐私设置如何都必须填写 bilibili_api 授权设置才有效) bool True
    SKIP_COLLECTED 跳过更新已更新动画的收藏状态 bool True
    OPEN_FAILED_BANGUMI_BILI_PAGE 自动打开更新失败的动画的页面(可能会一次性弹出非常多页面) bool False
    CONNECTION_LIMIT_PER_HOST 每站点最大并发连接数(越多越快,但太多可能会导致服务器不可用) int 15
    PRINT_DEBUG_INFORMATION 打印调试信息,调试用 bool False
    READ_ONLY 只打印信息而不实际进行更新操作,调试用 bool False

致谢

bilibili2bangumi's People

Contributors

cberyellowstone avatar finbird avatar nkid00 avatar sinc-g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

finbird

bilibili2bangumi's Issues

许可证冲突

非常大的问题:bilibili-api 是 GPLv3 的,Bilibili2Bangumi 的许可证也应该同样用 GPLv3。

报错,详情见内

PS D:\Code\Bilibili2Bangumi> python bili2bgm.py
请在弹出的授权页面中点击授权。
若授权页面没有自动弹出,请手动复制链接至浏览器中打开:
https://bgm.tv/oauth/authorize?client_id=bgm184060850037e220f&response_type=code
正在尝试取得授权...
Traceback (most recent call last):
File "bili2bgm.py", line 44, in
loop.run_until_complete(main())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "bili2bgm.py", line 34, in main
bgm_auth_data = await auth_bgm_task
File "D:\Code\Bilibili2Bangumi\auth.py", line 83, in auth_bgm
f'{bgm_auth_data_raw["token_type"]}'
KeyError: 'token_type'

上述问题不再深究

feat: 自动跳过已经收藏的动画

如果之前运行过 Bilibili2Bangumi 或者手动收藏过一些动画,下一次运行时这些动画会被再次迁移。这样可能会导致 Bangumi 时间胶囊显示混乱并且会影响性能。

请求添加许可证

现在没有许可证的情况下默认由作者保留有大多数权力,甚至包括自由使用软件的权利。换句话说,目前在未经作者同意的情况下使用这个仓库也是不被允许的。
因此请求添加许可证。如果觉得太麻烦想直接放弃大多数权利的话可以考虑下 MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.