Migrate BiliBili watched anime to Bangumi

Overview

说明

之前为了将B站看过的动画迁移到bangumi写的, 本来只是自己用, 但公开可能对其他人会有帮助.

仓库最近无法维护, 程序有很多缺点, 欢迎 PR 和 Contributors

使用说明

  1. Python版本要求:Python 3.8+

  2. 使用前安装依赖包:

    pip install -r requirements.txt
    
  3. 配置 Bilibili-API :

    如果 Bilibili 个人隐私设置为 不公开 番剧观看信息,则需要获取身份验证信息,获取方法详见此处

    获取后在 bili2bangumi.py 中填入 sessdatacsrf 信息

    # bili2bangumi.py 第 22 行:
    
    uid = 12345                    # Bilibili 用户 ID,必填
    sessdata = "此处填入 sessdata"  # 填入 sessdata,选填
    csrf = "此处填入 csrf"          # 填入 csrf ,选填
    
  4. Bangumi API OAuth2 授权配置:

    需获取并填入 client_idclient_secret

    下面是获取方法:

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

      image

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

      image

    2. 获取 App IDApp Secret

      并将 回调地址 设置为 http://localhost:3000

      image

    3. App IDApp Secret 填入 bili2bangumi.py 中:

      # bili2bangumi.py 第 28 行
      
      client_id = '此处填入 App ID'          # 必填,填入 App ID
      client_secret = '此处填入 App Secret'  # 必填,填入 App Secret
      
  5. 在完成上述步骤后,运行程序:

    python bili2bangumi.py
    
Comments
  • 报错,详情见内

    报错,详情见内

    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'

    上述问题不再深究

    bug 
    opened by CberYellowstone 15
  • Socket 无法获取到 code

    Socket 无法获取到 code

    报错信息

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 8: invalid start byte
    

    出错位置

    https://github.com/wopub/Bilibili2Bangumi/blob/fd531b434980e41d4fb60e3729a366cbb06f1bba/lib/auth.py#L67

    后面这个 ignore 是我加的,但忽略还是解析不到code,不知道是哪里出了问题 @CberYellowstone

    bug 
    opened by SINC-G 7
  • 保持原追番状态、自动更新看过动画的分集进度、异步网络操作和其他特性

    保持原追番状态、自动更新看过动画的分集进度、异步网络操作和其他特性

    主要新特性:

    • 保持原追番状态(想看-在看-看过)
    • 自动更新看过动画的分集进度
    • 完全使用异步网络操作,速度提升数十倍
    • 兼容最新的bilibili-api>=5.0

    其他新特性:

    • 异常自动重试
    • 更友好的提示信息
    • 自动打开更新失败的动画的 Bilibili 页面(可选)
    • 使用pipenv自动处理依赖
    • 不再依赖requests
    opened by NKID00 3
  • Fix typo

    Fix typo

    不存在字段 'auth_data',只有'bgm_auth_data' 未修改前报错信息:

    Traceback (most recent call last): File "bili2bgm.py", line 44, in loop.run_until_complete(main()) File "D:\anaconda3\lib\asyncio\base_events.py", line 579, in run_until_complete return future.result() File "bili2bgm.py", line 38, in main await get_and_update(bili2bgm_map, bili_auth_data, BILI_UID, bgm_auth_data) File "update.py", line 241, in get_and_update await data.update_bgm_data_task File "update.py", line 137, in update_bgm_data await gather(*data.update_one_bgm_data_tasks) File "update.py", line 92, in update_one_bgm_data lambda: client.post( File "utilities.py", line 67, in try_for_times_async_chain result = await func() File "update.py", line 95, in headers={'Authorization': data.auth_data} AttributeError: 'types.SimpleNamespace' object has no attribute 'auth_data'

    opened by FinBird 1
  • 适配新的 Bangumi API 并改许可证为 AGPL-3.0-only

    适配新的 Bangumi API 并改许可证为 AGPL-3.0-only

    部分被弃用而且已在文档中被删除的旧 API 虽然还能工作但可能会在不知什么时候突然不工作。

    新 API 的后端是 AGPL-3.0-only 的因此要适配新 API 的话大概也要改许可证为 AGPL-3.0-only。于是征求下目前4位贡献者的意见,同意的话点个 emoji 或者回个同意。

    • [x] @SINC-G
    • [x] @CberYellowstone
    • [x] @FinBird
    • [x] @NKID00

    ~(高考刚考完又要开工了)~

    refactor 
    opened by NKID00 3
Releases(v0.1.1)
  • v0.1.1(Sep 25, 2021)

    🎉更新日志

    • 合并了 #17(感谢 @CberYellowstone)
    • 修复了 API 调用错误

    要使用该版本的 Bilibili2Bangumi,下载下方的 Source code (zip) 解压即可。

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Aug 29, 2021)

    🎉更新日志

    • 合并了 #3 #4 #6 #7 #9 #14(感谢 @CberYellowstone @FinBird )
    • 全部使用异步网络操作
    • 增加保持原追番状态功能
    • 增加自动点格子功能
    • 增加一些可由用户选择的选项
    • 增加一些友好的提示信息
    • 使用更有意义的 user-agent Bilibili2Bangumi/<Bilibili2Bangumi 版本> (https://github.com/wopub/Bilibili2Bangumi) aiohttp/<aiohttp 版本>
    • 添加许多调试信息
    • 提高了一点点性能

    要使用该版本的 Bilibili2Bangumi,下载下方的 Source code (zip) 解压即可。

    Source code(tar.gz)
    Source code(zip)
Open Source Discord bot with many cool features like Weather, Balance, Avatar, User, Server, RP-commands, Gif search, YouTube search, VK post search etc.

Сокобот Дискорд бот с открытым исходным кодом. Содержит в себе экономику, полезные команды (!аватар, !юзер, !сервер и тд.), рп-команды (!обнять, !глад

serverok 2 Jan 16, 2022
Programa de código abierto para probar el API de Bitso, el exchange más importante de América Latina.

Bitso Semiautomático Programa de código abierto para probar el API de Bitso, el exchange más importante de América Latina. Desarrollador Fernando Mire

Fernando Mireles 17 Dec 07, 2022
Python library to download market data via Bloomberg, Eikon, Quandl, Yahoo etc.

findatapy findatapy creates an easy to use Python API to download market data from many sources including Quandl, Bloomberg, Yahoo, Google etc. using

Cuemacro 1.3k Jan 04, 2023
C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved.

C Y B Ξ R USΞRBOT 🇦🇿 C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved. Automatic Setup Android: open Termux p

C Y B Ξ R 0 Sep 20, 2022
A python SDK for interacting with quantum devices on Amazon Braket

Amazon Braket Python SDK The Amazon Braket Python SDK is an open source library that provides a framework that you can use to interact with quantum co

Amazon Web Services 213 Dec 14, 2022
Simple tool to gather domains from crt.sh using the organization name

Domain Collector: _ _ ___ _ _ _ __| | ___ _ __ ___ __ _(_)_ __ / __\___ | |

Cyber Guy 63 Dec 24, 2022
A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features

Vegeta Robot A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features ... Written with Pyrogram and Telethon...

⚡ CT_PRO ⚡ 9 Nov 16, 2022
GitGram Bot. Bot Then Message You Your Repo Starts, Forks, And Many More

Yet Another GitAlertBot Inspired From Dev-v2's GitGram Run Bot: Local Host Git Clone Repo : For Telethon Version : git clone https://github.com/TeamAl

Alina RoBot 2 Nov 24, 2021
Source Code for our bot that manages time and other functions of the server <3

Komi San wants you to study This repo contains the source code for our bot that manages time and other functions of the server 3 Features Your study

Komi San wants you to study 8 Nov 08, 2021
CSUL Discord Bot

Cruzeiro This is the same old bot running on the Discord Server of CSUL, but i've changed the code. It's better now. Discord.py Heroku How i did The b

Operaho 6 Jan 31, 2022
Bitstamp API wrapper for Python

NOTICE: THIS REPOSITORY IS NO LONGER ACTIVELY MAINTAINED It is highly unlikely that I will respond to PRs and questions about usage. This library was

Jack Preston 53 Mar 09, 2022
Student-Management-System-in-Python - Student Management System in Python

Student-Management-System-in-Python Student Management System in Python

G.Niruthian 3 Jan 01, 2022
Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much more!

Acid's Utilities Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much mo

AcidFilms (Fin Stuart) 3 Nov 19, 2021
Support for Competitive Coding badges to add in Github readme or portfolio websites.

Support for Competitive Coding badges to add in Github readme or portfolio websites.

Akshat Aggarwal 2 Feb 14, 2022
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS node

levina 143 Jun 19, 2022
Me and @nathanmargni did a small analysis on what are the best strategies to win more games of League of Legends.

Me and @nathanmargni did a small analysis on what are the best strategies to win more games of League of Legends.

Christian Berchtold 2 Jan 19, 2022
A CLI tool to transfer, sync, and backup playlists on music streaming services

unitunes A command-line interface tool to manage playlists across music streaming services. Introduction unitunes manages playlists across streaming s

Victor Tao 50 Jan 07, 2023
Unauthenticated enumeration of services, roles, and users in an AWS account or in every AWS account in existence.

Quiet Riot 🎶 C'mon, Feel The Noise 🎶 An enumeration tool for scalable, unauthenticated validation of AWS principals; including AWS Acccount IDs, roo

Wes Ladd 89 Jan 05, 2023
Td-Ameritrade, Tradingview, Webhook, AWS Chalice

TDA-Autobot TDA-Autobot is an automated fire and forget trading mechanism utilizing Alex Golec's(Author) tda-api wrapper, Tradingview webhook alerts,

Kyle Jorgensen 2 Dec 12, 2021
Protection-UB - Simple Group Protection userbot running on python3 with ARQ

Protection-UB Simple Group Protection userbot running on python3 with ARQ ⚠️ Not

szsupunma 1 Feb 06, 2022