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)
Owner
null
Kevin L. 3 Jul 14, 2022
可基于【腾讯云函数】/【GitHub Actions】/【Docker】的每日签到脚本(支持多账号使用)签到列表: |爱奇艺|全民K歌|腾讯视频|有道云笔记|网易云音乐|一加手机社区官方论坛|百度贴吧|Bilibili|V2EX|咔叽网单|什么值得买|AcFun|天翼云盘|WPS|吾爱破解|芒果TV|联通营业厅|Fa米家|小米运动|百度搜索资源平台|每日天气预报|每日一句|哔咔漫画|和彩云|智友邦|微博|CSDN|王者营地|

每日签到集合 基于【腾讯云函数】/【GitHub Actions】/【Docker】的每日签到脚本 支持多账号使用 特别声明: 本仓库发布的脚本及其中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。

null 87 Nov 12, 2022
A small script to migrate or synchronize users & groups from Okta to AWS SSO

aws-sso-sync-okta A small script to migrate or synchronize users & groups from Okta to AWS SSO Changelog Version Remove hardcoded values on variables

Paul 4 Feb 11, 2022
Telegram anime bot that uses Anilist API

Telegram Bot Repo Capable of fetching the following Info via Anilist API inspired from AniFluid and Nepgear Anime Airing Manga Character Scheduled Top

Lucky Jain 71 Jan 3, 2023
Anime Streams Scrapper for Telegram Publicly Available for everyone to use

AniRocks Project Structure: ╭─ bot ├──── plugins: directory stored all the plugins ├──── utils: a directory of Utilities to help bot Client to create

ポキ 11 Oct 28, 2022
An powerfull telegram group management anime themed bot.

ErzaScarlet Erza Scarlet is the female deuteragonist of the anime/manga series Fairy Tail. She is an S-class Mage from the Guild Fairy Tail. Like most

ꜱōʜᴇʀᴜ ᴋāɴ (AKA) ꜱᴏʜᴀɪʟ ᴋʜᴀɴ 2 May 19, 2022
A Telegram bot that searches for the original source of anime, manga, and art

A Telegram bot that searches for the original source of anime, manga, and art How to use the bot Just send a screenshot of the anime, manga or art or

Kira Kormak 9 Dec 28, 2022
An Anime Themed Fast And Safe Group Managing Bot.

Ξ L I N Λ ?? A Powerful, Smart And Simple Group Manager bot Avaiilable a latest version as Ξ L I N Λ ?? on Telegram Self-hosting (For Devs) vps # Inst

null 7 Nov 12, 2022
An anime themed telegram group management bot based on sqlalchemy database running on python3.

Kazuko Robot A Telegram Python bot running on python3 forked with saitama and DiasyX with a sqlalchemy database and an entirely themed persona to make

heyaaman 22 Dec 7, 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 5, 2021
Anime Themed Telegram Group Manager Bot By WaifuNetwork

?? Yukino Yukinoshita ?? #This Is The OLD version Of Yukino Bot New Version Of Yukino Yukinoshita is private. Thanks to everyone who starred Yukino, T

TR0J3N 4 Jan 10, 2022
A modular bot running on python3 with anime theme and have a lot features

STINKY ROBOT Emiko Robot is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is Cre

Riyan.rz 3 Jan 21, 2022
🔍 📊 Look up information about anime, manga and much more directly in Discord!

AniSearch The source code of the AniSearch Discord Bot. Contribute You have an idea or found a bug? Open a new issue with detailed explanation. You wa

私はレオンです 19 Dec 7, 2022
A Characther powerful in saints saiya anime and modular telegram group management bot built using python3

Kaneki Ken A Powerful and Modular Saint Aries is a Characther powerful in saints saiya anime and modular telegram group management bot built using pyt

null 1 Dec 21, 2021
Neko is An Anime themed advance Telegram group management bot.

NekoRobot A modular telegram Python bot running on python3 with an sqlalchemy, mongodb database. ╒═══「 Status 」 Maintained Support Group Included Free

Lovely Boy 22 Jan 5, 2023
Neko: An Anime themed advance Telegram group management bot

???????????????? ?????????? A modular telegram Python bot running on python3 wit

「 Rajkumar™ 」 39 Jan 8, 2023
A Next-Gen modular Python3 Telegram-Bot with Anime Theme to it.

Hsea Robot A modular Telegram Python bot running on python3 with a sqlalchemy database and an entirely themed persona to make Cutiepii suitable for An

Wahyusaputra 1 Dec 29, 2021
A module to get data about anime characters, news, info, lyrics and more.

Animec A module to get data about anime characters, news, info, lyrics and more. The module scrapes myanimelist to parse requested data. If you wish t

DriftAsimov 31 Aug 31, 2022
NekoRobot-2 - Neko is An Anime themed advance Telegram group management bot.

NekoRobot A modular telegram Python bot running on python3 with an sqlalchemy, mongodb database. ╒═══「 Status 」 Maintained Support Group Included Free

Lovely Boy 19 Nov 12, 2022