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)
A wrapper for slurm especially on Taiwania2 (HPC CLI)A wrapper for slurm especially on Taiwania2 (HPC CLI)

TWCC-slurm-wrapper A wrapper for slurm especially on Taiwania2 (HPC CLI). For Taiwania2 (HPC CLI) usage, please refer to here. (中文) How to Install? gi

Chi-Liang, Liu 5 Oct 07, 2022
A Telegram bot for playing Trop Bon Cadavre.

Trop Bon Cadavre A Telegram bot for playing Trop Bon Cadavre (english: very good corpse), a game freely adapted from the french Cadavre exquis. A game

4 Oct 26, 2021
A Telegram bot to index Chinese and Japanese group contents, works with @lilydjwg/luoxu.

luoxu-bot luoxu-bot 是类似于 luoxu-web 的 CJK 友好的 Telegram Bot,依赖于 luoxu 所创建的后端。 测试环境 Python 3.7.9 pip 21.1.2 开发中使用到的 Telethon 需要 Python 3+ 配置 前往 luoxu 根据相

TigerBeanst 10 Nov 18, 2022
RequestTrackerBot - Request Tracker Bot With Python

Request Tracker Bot This is a Request Tracker Bot repo, It is for those who uplo

Prince Jaiswal 1 Dec 30, 2021
Discord Remote Administration Tool fully written in Python3.

DiscordRAT Discord Remote Administration Tool fully written in Python3. This is a RAT controlled over Discord with over 50 post exploitation modules.

hozzywozzy 2 Feb 06, 2022
Display relevant information for the amazing Banano coin.

Display relevant information for the amazing Banano coin. It'll also show your current [email 

Ron Talman 4 Aug 14, 2022
TwitterBot-ImageCollector - Twitter bot that collects images from likes saves the image

TwitterBot-ImageCollector Bot de Twitter que recolecta imagenes a partir de los

Gx3 Studios 4 Jun 01, 2022
Dynamic Twitter banner, to show off your spotify status. Banner updated every 5 minutes.

Spotify Twitter Banner Dynamic Twitter banner, to show off your spotify status. Banner updated every 5 minutes. Installation and Usage Install the dep

Sunrit Jana 23 Jan 05, 2023
🐙 Share your Github stats for 2020 on Twitter

Year on Github 🐙 Share your Github stats for 2020 on Twitter. This project contains a small web app that let's you share stats about your Github acti

Johannes Rieke 129 Dec 25, 2022
A fork of discord.py for anime enjoyers

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 05, 2021
Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

1 Feb 09, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022
A simple Python script using Telethon to log all (or some) messages a user or bot account can see on Telegram.

telegram-logger A simple Python script using Telethon to log all (or some) messages a user or bot account can see on Telegram. Requirements Python 3.6

Richard 13 Oct 06, 2022
Versatile async-friendly library to retry failed operations with configurable backoff strategies

riprova riprova (meaning retry in Italian) is a small, general-purpose and versatile Python library that provides retry mechanisms with multiple backo

Tom 108 Apr 27, 2022
Some 3Commas helper bots, AltRank, GalaxyScore, Watchlist, Auto-Compound

3Commas Cyber Bot Helpers A collection of 3Commas bot helpers I wrote. (collection will grow over time) Disclaimer THE SOFTWARE IS PROVIDED "AS IS", W

Ron Klinkien 176 Jan 02, 2023
[Fullversion]Web3 Pancakeswap Sniper bot written in python3.

🚀 Pancakeswap BSC Sniper Bot 🚀 Web3 Pancakeswap Sniper && Take Profit/StopLose bot written in python3, Please note the license conditions! The secon

21 Dec 11, 2022
Trust-minimized Bitcoin wallet

coldcore Trust-minimized, airgapped Bitcoin management This is experimental software. Wait for a formal release before use with real funds. A trust-mi

James O'Beirne 121 Jan 01, 2023
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
💬 Send iMessages using Python through the Shortcuts app.

py-imessage-shortcuts Send iMessages using Python through the Shortcuts app. Requires macOS Monterey (macOS 12) or later. Compatible with Apple Silico

Kevin Schaich 10 Nov 30, 2022
AWS-serverless-starter - AWS Lambda serverless stack via Serverless framework

Serverless app via AWS Lambda, ApiGateway and Serverless framework Configuration

Bəxtiyar 3 Feb 02, 2022